@font-face { font-family: "Francois One"; src: url(fonts/francoisone-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/sourceserif4-normal.woff2) format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/sourceserif4-italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --paper: #f6f3ec;
  --paper-2: #ece6d8;
  --ink: #1f2a1f;
  --ink-soft: #4d5a4b;
  --green: #5c7345;
  --green-dark: #34472f;
  --leaf: #9dbb5f;
  --bark: #6b4526;
  --line: rgba(31, 42, 31, .16);
  --mint: #e8efdc;
  --accent: #c8672f;
  --accent-ink: #a14b1a; /* zelfde oranje, donker genoeg voor kleine tekst (AA) */
  --display: "Francois One", "Arial Narrow", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --measure: 40rem;
  --wide: 68rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.1875rem/1.62 var(--serif); font-optical-sizing: auto; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: .005em; margin: 0; }
h2 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--green-dark); margin-bottom: 1.5rem; }
h3 { font-size: 1.6rem; color: var(--green); margin: 2rem 0 .6rem; }
p { margin: 0 0 1.1em; }

.wrap { width: min(var(--measure), 100% - 2rem); margin-inline: auto; position: relative; z-index: 1; }
.wrap-wide { width: min(var(--wide), 100% - 2rem); margin-inline: auto; position: relative; z-index: 1; }
section { position: relative; padding: clamp(4rem, 10vw, 7.5rem) 0; }

.progress { position: fixed; inset: 0 0 auto; height: 4px; z-index: 50; background: transparent; }
.progress span { display: block; height: 100%; width: 100%; background: var(--green); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

/* Hero */
.hero { position: relative; min-height: min(92vh, 56rem); display: grid; place-items: center; padding: 6rem 1rem 12rem; overflow: hidden; background: linear-gradient(180deg, #eef0e6 0%, var(--paper) 100%); }
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 58rem; }
.kicker { font-family: var(--display); text-transform: uppercase; letter-spacing: .14em; font-size: .9rem; color: var(--green); margin-bottom: 1.2rem; }
.hero h1 { font-size: clamp(3rem, 10vw, 7.5rem); color: var(--green-dark); line-height: .95; text-wrap: balance; }
.byline { margin-top: 1.6rem; font-style: italic; color: var(--ink-soft); }
.hero-tree { position: absolute; bottom: -1px; z-index: 1; width: clamp(9rem, 26vw, 22rem); opacity: .95; }
.hero-tree.t1 { left: -2%; }
.hero-tree.t2 { left: 50%; translate: -50% 0; width: clamp(7rem, 15vw, 13rem); opacity: .5; }
.hero-tree.t3 { right: -3%; width: clamp(10rem, 30vw, 26rem); }

.intro { padding-top: 3rem; }
.lead { font-size: 1.45rem; line-height: 1.5; }
.lead::first-letter { font-family: var(--display); float: left; font-size: 4.6rem; line-height: .82; padding: .3rem .6rem 0 0; color: var(--green); }
.question { font-family: var(--display); font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.15; color: var(--green-dark); margin-top: 2.5rem; padding-left: 1.2rem; border-left: 6px solid var(--leaf); }

/* Ecosysteemdiensten */
.functies h2 { text-align: center; }
.pill { font: inherit; font-family: var(--display); font-size: 1.3rem; color: #fff; background: var(--green); border: 0; border-radius: 999px; padding: .45rem 1.1rem .45rem 1.3rem; display: inline-flex; align-items: center; gap: .7rem; cursor: pointer; transition: background .2s; }
.pill:hover { background: var(--green-dark); }
.pill .q { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #1d1d1b; font-size: 1rem; line-height: 1; transition: background .2s; }
.esd-head { text-align: center; margin-bottom: 2rem; }
.credit { font-size: .85rem; color: var(--ink-soft); font-style: italic; }
.esd-grid { display: grid; grid-template-columns: 1fr minmax(14rem, 22rem) 1fr; grid-template-areas: "prod tree reg" "cult tree reg"; gap: 1.5rem 2.5rem; align-items: start; }
.g-prod { grid-area: prod; } .g-reg { grid-area: reg; align-self: center; } .g-cult { grid-area: cult; } .esd-tree { grid-area: tree; margin: 0; align-self: center; }
.esd-list { list-style: none; padding: 0; margin: 1rem 0 0 .4rem; display: grid; gap: .7rem; }
.esd-list li { display: flex; align-items: center; gap: .9rem; font-family: var(--display); font-size: 1.15rem; }
.esd-list svg { width: 2.6rem; height: 2.6rem; flex: none; }
.esd-tree svg { width: 100%; height: auto; overflow: visible; }
.esd-tree .arrow { fill: none; stroke: var(--leaf); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) { .esd-tree .arrow { display: none; } }
.hint { text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: 2rem; font-style: italic; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

/* Stad Gent */
.timeline { margin-block: 3.5rem; padding: 2rem clamp(1rem, 4vw, 3rem) 1.5rem; background: #fff; border-radius: 16px; }
.fig-title { font-family: var(--display); font-size: 1.35rem; color: var(--green-dark); margin-bottom: 1.2rem; }
.timeline ol { list-style: none; margin: 0 0 1rem; padding: 0; position: relative; height: 7.5rem; }
.timeline ol::before { content: ""; position: absolute; left: 0; right: 0; top: 2.55rem; height: 3px; background: var(--green); border-radius: 2px; }
.timeline li { position: absolute; left: calc(var(--x) * 100%); translate: calc(var(--x) * -100%) 0; width: 9.5rem; text-align: center; display: grid; justify-items: center; }
.timeline li:first-child { text-align: left; justify-items: start; }
.timeline li:last-child { text-align: right; justify-items: end; }
.timeline .yr { font-family: var(--display); font-size: 1.7rem; line-height: 1; color: var(--green-dark); }
.timeline .dot { width: 1rem; height: 1rem; border-radius: 50%; background: #fff; border: 3px solid var(--green); margin: .5rem 0 .6rem; }
.timeline li:last-child .dot { background: var(--green); }
.timeline .what { font-size: .88rem; line-height: 1.3; color: var(--ink-soft); }
.plans { position: relative; height: 2.2rem; }
.plans span { position: absolute; left: calc(var(--a) * 100%); width: calc((var(--b) - var(--a)) * 100%); border-top: 3px solid var(--leaf); font-family: var(--display); font-size: .78rem; color: var(--green); text-align: center; padding-top: .3rem; white-space: nowrap; }
.plans span.now { border-color: var(--accent); color: var(--accent-ink); }
.src { font-size: .82rem; color: var(--ink-soft); margin-top: .8rem; font-family: var(--serif); font-style: italic; }
.src-inline { font-size: .9rem; color: var(--ink-soft); }

.voices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.5rem; }
.voice { background: var(--green-dark); color: #f3f1e8; border-radius: 16px; padding: 1.8rem 1.8rem 1.4rem; display: flex; flex-direction: column; }
.voice h3 { color: #fff; margin: 0; font-size: 2rem; }
.voice .role { color: #b9c7a8; font-style: italic; margin: .3rem 0 1.2rem; font-size: .98rem; }
.voice ul { padding: 0; margin: 0 0 1.5rem; list-style: none; display: grid; gap: 1rem; font-size: 1.02rem; line-height: 1.55; }
.voice li { padding-left: 1.3rem; position: relative; }
.voice li::before { content: ""; position: absolute; left: 0; top: .6em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--leaf); }

.embed { position: relative; }
.embed iframe { display: block; width: 100%; border: 0; border-radius: 10px; }
.play { font: inherit; font-family: var(--display); font-size: 1.05rem; display: inline-flex; align-items: center; gap: .75rem; cursor: pointer; border: 0; border-radius: 999px; padding: .6rem 1.2rem .6rem .6rem; background: #f3f1e8; color: var(--green-dark); text-align: left; }
.play:hover { background: #fff; }
.play-ico { width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); flex: none; position: relative; }
.play-ico::after { content: ""; position: absolute; left: 55%; top: 50%; translate: -50% -50%; border-left: .7rem solid #fff; border-block: .45rem solid transparent; }
.consent { font-size: .78rem; opacity: .7; margin: .5rem 0 0; }

/* Charts */
.chart { margin-block: 2.5rem 3.5rem; }
.chart-box { width: 100%; min-height: 12rem; }
.chart-box svg { width: 100%; height: auto; overflow: visible; font-family: var(--serif); }
.chart .axis text { font-size: 12px; fill: var(--ink-soft); }
.chart .grid line { stroke: var(--line); }
.chart .lbl { font-family: var(--display); font-size: 14px; fill: var(--ink); }
.chart .lbl-accent { fill: var(--accent-ink); }
.punch { font-family: var(--display); font-size: 1.7rem; line-height: 1.2; color: var(--accent-ink); }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: .82rem; padding: .3rem .55rem; border-radius: 6px; translate: -50% -130%; white-space: nowrap; opacity: 0; transition: opacity .12s; z-index: 5; }

.rule-title { font-size: 2.2rem; color: var(--green-dark); }
.rule { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin-block: 2rem; }
.rule-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.6rem; }
.rule-card .big { font-family: var(--display); font-size: 4.2rem; line-height: 1; color: var(--green); }
.rule-card .norm { font-family: var(--display); font-size: 1.1rem; margin: .4rem 0 1.2rem; }
.rule-card .gent { font-size: .98rem; margin: 1rem 0 0; color: var(--ink-soft); }
.rule-card .gent strong { color: var(--accent-ink); font-weight: 600; }
.thirds { display: flex; gap: .5rem; }
.thirds i { flex: 1; height: 2.2rem; border-radius: 6px; background: var(--paper-2); }
.thirds i.on { background: var(--accent); }
.cover { position: relative; height: 2.2rem; background: var(--paper-2); border-radius: 6px; }
.cover i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 6px 0 0 6px; }
.cover b { position: absolute; top: -.35rem; bottom: -.35rem; width: 3px; background: var(--green-dark); }
.cover b::after { content: "doel"; position: absolute; top: -1.3rem; left: 50%; translate: -50% 0; font: .75rem var(--display); color: var(--green-dark); }
.walk { width: 100%; height: 2.2rem; color: var(--ink-soft); }

.map { margin-block: 3rem; }
.map-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; margin-bottom: .8rem; font-size: .92rem; }
.key { display: inline-flex; align-items: center; gap: .45rem; }
.key i { width: .8rem; height: .8rem; border-radius: 50%; }
.k-all { background: #346e28; } .k-new { background: #d9541a; }
#map-toggle { margin-left: auto; font: inherit; font-size: .9rem; border: 1px solid var(--green); color: var(--green-dark); background: transparent; border-radius: 999px; padding: .35rem .9rem; cursor: pointer; }
#map-toggle[aria-pressed="true"] { background: var(--green); color: #fff; }

/* Steenakker */
.compare { margin-block: 2.5rem; }
.cmp { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 1500 / 920; background: var(--paper-2); user-select: none; }
.cmp > img, .cmp-before img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; background: #fff; translate: -50% 0; box-shadow: 0 0 12px rgba(0,0,0,.35); pointer-events: none; }
.cmp-handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: #fff; color: var(--green-dark); font: 1.2rem/2.7rem var(--display); text-align: center; letter-spacing: .1em; }
.cmp input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.cmp input:focus-visible + .cmp-handle, .cmp:has(input:focus-visible) .cmp-handle { box-shadow: 0 0 0 3px var(--accent); }
.cmp-label { position: absolute; top: 1rem; font-family: var(--display); color: #fff; background: rgba(31,42,31,.7); padding: .15rem .6rem; border-radius: 6px; font-size: 1rem; pointer-events: none; }
.cmp-label.l { left: 1rem; } .cmp-label.r { right: 1rem; }

.video .embed { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #111; }
.video .embed > img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7); }
.video .embed iframe { position: absolute; inset: 0; height: 100%; border-radius: 0; }
.big-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; max-width: calc(100% - 2rem); }
.video .consent { position: absolute; bottom: .8rem; left: 0; right: 0; text-align: center; color: #fff; }

/* Conclusie */
.forest { display: flex; align-items: flex-end; justify-content: center; gap: 0; margin-top: 3rem; overflow: hidden; }
.forest img { height: clamp(6rem, 18vw, 13rem); width: auto; margin-inline: -1.2vw; flex: none; }
.forest img:nth-child(even) { height: clamp(4.5rem, 13vw, 9.5rem); }

/* Credits */
.credits { background: var(--green-dark); color: #eef1e6; padding: 4rem 0 2rem; }
.credits h2 { color: #fff; font-size: 2.6rem; }
.credits h3 { color: #b9c7a8; margin-top: .4rem; }
.credits a { color: #fff; }
.credits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 2rem 4rem; }
.authors { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.authors li { display: flex; align-items: center; gap: 1rem; font-family: var(--display); font-size: 1.3rem; }
.authors small { display: block; font-family: var(--serif); font-style: italic; font-size: .9rem; color: #b9c7a8; }
.thanks { margin: 0; display: grid; gap: .1rem; }
.thanks dt { font-family: var(--display); font-size: 1.15rem; margin-top: .7rem; }
.thanks dd { margin: 0; font-size: .95rem; color: #c9d3bb; font-style: italic; }
.colophon { margin-top: 3rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.18); font-size: .85rem; color: #b9c7a8; }


/* Hoofdstukken wisselen van achtergrond: papier, wit, bladgroen */
section { overflow: hidden; }
.intro { background: var(--paper); }
.functies { background: #fff; }
.stad { background: var(--mint); }
.cijfers { background: var(--paper); }
.wijken { background: #fff; }
.conclusie { background: linear-gradient(180deg, var(--mint) 0%, #d9e6c6 100%); padding-bottom: 0; }

/* Verschijnen bij scrollen (alleen met JS, anders altijd zichtbaar) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .deco { opacity: 0; transform: translateY(24px) rotate(var(--r, 0deg)); transition: opacity 1s ease .15s, transform 1.2s cubic-bezier(.2, .7, .2, 1) .15s; }
.js .deco.in { opacity: 1; transform: rotate(var(--r, 0deg)); }

/* Pop-ups bij de ecosysteemdiensten */
.esd-dialog { border: 0; padding: 0; border-radius: 18px; width: min(46rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(20, 30, 20, .35); overflow: auto; }
.esd-dialog[open] { display: grid; grid-template-columns: 13rem 1fr; animation: pop .3s cubic-bezier(.2, .8, .2, 1); }
.esd-dialog::backdrop { background: rgba(31, 42, 31, .55); backdrop-filter: blur(4px); }
.dlg-art { background: var(--mint); display: grid; place-items: center; padding: 1.5rem; }
.dlg-art img { max-height: 14rem; width: auto; }
.dlg-body { padding: 2rem 2.4rem 1rem 2rem; font-size: 1.05rem; line-height: 1.6; }
.dlg-body h3 { margin: 0 0 1rem; font-size: 1.9rem; color: var(--green-dark); }
.dlg-close { position: absolute; top: .7rem; right: .7rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: var(--green-dark); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.dlg-close:hover { background: var(--accent-ink); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }

/* SoundCloud-speler met foto */
.voice .sc { margin-top: auto; border: 0; border-radius: 12px; display: block; }

/* Kaart */
.map-box { border-radius: 16px; overflow: hidden; position: relative; background: #ececec; border: 1px solid var(--line); }
#map { height: clamp(24rem, 72vh, 44rem); background: #ececec; font-family: var(--serif); }
#map .leaflet-control-zoom a { font-family: var(--display); color: var(--green-dark); }
#map .leaflet-control-attribution { font-size: .7rem; }
.tree-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 450; }
.map-hint { position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0; z-index: 800; background: rgba(31, 42, 31, .88); color: #fff; font-size: .85rem; padding: .35rem .8rem; border-radius: 999px; pointer-events: none; transition: opacity .3s; white-space: nowrap; }

/* Portretten */
.authors img { width: 6rem; height: 6rem; object-fit: cover; object-position: 50% 20%; border-radius: 50%; border: 3px solid var(--leaf); }

/* Bloemen en insecten door het stuk, zoals in de oorspronkelijke versie */
.deco { position: absolute; z-index: 0; pointer-events: none; width: var(--w, 5rem); height: auto; }
.d-i1 { --w: 4.5rem; left: 4%; top: 30%; }
.d-i2 { --w: 5.5rem; right: 6%; top: 12%; --r: 14deg; }
.d-f1 { --w: 4rem; left: 3%; bottom: 8%; }
.d-f2 { --w: 7rem; right: 4%; top: 6%; --r: -10deg; }
.d-ladybug { --w: 5rem; left: 6%; top: 6rem; --r: -18deg; }
.d-bee { --w: 6rem; right: 7%; top: 14rem; --r: 12deg; }
.d-s1 { --w: 4rem; left: 3%; top: 38%; }
.d-s2 { --w: 6rem; right: 4%; top: 45%; --r: -8deg; }
.d-s3 { --w: 4.5rem; left: 6%; bottom: 10%; --r: 20deg; }
.d-s4 { --w: 5rem; right: 3%; bottom: 4%; }
.d-stag { --w: 5.5rem; right: 6%; top: 5rem; }
.d-c1 { --w: 5rem; left: 3%; top: 16%; }
.d-c2 { --w: 3.5rem; right: 5%; top: 30%; --r: 25deg; }
.d-c3 { --w: 3.5rem; left: 4%; top: 52%; }
.d-c4 { --w: 5rem; right: 4%; top: 64%; --r: -14deg; }
.d-c5 { --w: 3.5rem; left: 5%; bottom: 6%; }
.d-flower1 { --w: 6rem; left: 4%; top: 4rem; }
.d-flower2 { --w: 6.5rem; right: 5%; top: 22rem; }
.d-w1 { --w: 5rem; left: 5%; top: 55%; --r: -12deg; }
.d-w2 { --w: 4rem; right: 4%; bottom: 8%; }
.d-k1 { --w: 4.5rem; right: 8%; top: 10%; --r: 18deg; }
.d-k2 { --w: 4.5rem; left: 6%; top: 20%; }
.d-k3 { --w: 6rem; right: 5%; top: 48%; --r: -6deg; }
@media (max-width: 1180px) {
  /* Smaller scherm: kleine accenten aan de rand, half buiten beeld, zodat ze de tekst niet raken */
  .deco { --w: 3rem; }
  .d-i1, .d-s1, .d-s3, .d-c1, .d-c5, .d-w1, .d-k2, .d-ladybug, .d-flower1 { left: -1rem; }
  .d-i2, .d-f2, .d-bee, .d-stag, .d-c2, .d-flower2, .d-k1 { right: -1rem; }
  .d-s2, .d-s4, .d-c3, .d-c4, .d-w2, .d-k3, .d-f1 { display: none; }
}

/* Ingebed als iframe: geen eigen kop of voortgangsbalk, geen hoogtes op basis van vh */
.embedded .hero, .embedded .progress { display: none; }
.embedded .intro { padding-top: 2.5rem; }
.embedded #map { height: 36rem; }
.embedded .esd-dialog { position: absolute; margin: 0 auto; max-height: none; }

/* Mobiel */
@media (max-width: 760px) {
  body { font-size: 1.09rem; }
  .lead { font-size: 1.25rem; }
  .esd-grid { grid-template-columns: 1fr; grid-template-areas: "tree" "prod" "reg" "cult"; }
  .esd-tree { width: 11rem; margin-inline: auto; }
  .timeline ol { height: auto; display: grid; gap: 1.2rem; padding-left: 1.6rem; }
  .timeline ol::before { left: .45rem; right: auto; top: .3rem; bottom: .3rem; width: 3px; height: auto; }
  .timeline li, .timeline li:first-child, .timeline li:last-child { position: relative; left: 0; translate: none; width: auto; text-align: left; justify-items: start; grid-template-columns: auto 1fr; column-gap: .8rem; }
  .timeline .dot { position: absolute; left: -1.6rem; top: .35rem; margin: 0; }
  .timeline .what { grid-column: 1 / -1; }
  .plans { display: none; }
  .esd-dialog[open] { grid-template-columns: 1fr; }
  .dlg-art { padding: 1rem; }
  .dlg-art img { max-height: 7rem; }
  .dlg-body { padding: 1.4rem 1.3rem .6rem; }
  #map-toggle { margin-left: 0; }
  .big-play { border-radius: 14px; font-size: .95rem; padding: .5rem .9rem .5rem .5rem; width: max-content; max-width: calc(100% - 2rem); }
  .video .consent { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .deco { opacity: 1; transform: none; }
}
