/* ==========================================================
   Schrijfsels: one kind of paper per soort
   column = krantenknipsel   uit-het-leven = notitieblok
   gedicht = kaartje         kort-verhaal = boekpagina
   brief = luchtpostbrief    op-zoek-naar-passie = systeemkaart
   ========================================================== */
:root {
	--k-column: #3A2E33;   --p-column: #F3EEE3;
	--k-leven: #B98330;    --p-leven: #FFFDF6;
	--k-gedicht: #8A6A9A;  --p-gedicht: #F7F1F8;
	--k-verhaal: #5F7F67;  --p-verhaal: #FCF8EF;
	--k-brief: #A8475B;    --p-brief: #FFFCF9;
	--k-reeks: #4F6F92;    --p-reeks: #FFFFFF;
}
.card--column, .sheet--column, .chip--column, .drawer--column { --k: var(--k-column); --p: var(--p-column); }
.card--uit-het-leven, .sheet--uit-het-leven, .chip--uit-het-leven, .drawer--uit-het-leven { --k: var(--k-leven); --p: var(--p-leven); }
.card--gedicht, .sheet--gedicht, .chip--gedicht, .drawer--gedicht { --k: var(--k-gedicht); --p: var(--p-gedicht); }
.card--kort-verhaal, .sheet--kort-verhaal, .chip--kort-verhaal, .drawer--kort-verhaal { --k: var(--k-verhaal); --p: var(--p-verhaal); }
.card--brief, .sheet--brief, .chip--brief, .drawer--brief { --k: var(--k-brief); --p: var(--p-brief); }
.card--op-zoek-naar-passie, .sheet--op-zoek-naar-passie, .chip--op-zoek-naar-passie, .drawer--op-zoek-naar-passie { --k: var(--k-reeks); --p: var(--p-reeks); }

.soort-icon { flex: none; }

/* ---------- Filter chips ---------- */
.archive-head { padding-bottom: 2rem; }
.archive-head__kind { display: flex; align-items: center; gap: .5rem; color: var(--muted); margin: 0 0 .5rem; }
.soort-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.chip {
	--k: var(--night);
	display: inline-flex; align-items: center; gap: .45rem; padding: .55em 1em; border-radius: 999px;
	border: 1.5px solid color-mix(in srgb, var(--k) 35%, transparent); color: var(--k); text-decoration: none; font-weight: 500; font-size: .98rem;
	background: var(--paper); transition: background-color .2s, color .2s, border-color .2s;
}
.chip span { font-family: var(--hand); font-size: 1.25rem; line-height: 1; opacity: .8; }
.chip:hover { border-color: var(--k); }
.chip.is-active { background: var(--k); border-color: var(--k); color: #fff; }

/* ---------- The pile (archive + homepage) ---------- */
.desk--archive { background: transparent; }
.pile { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.6rem 2rem; align-items: start; }
.pile > .card { margin-top: 1rem; }
@media (max-width: 980px) { .pile { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pile { grid-template-columns: 1fr; } }
.pile > .card:nth-child(3n+1) { rotate: -.7deg; }
.pile > .card:nth-child(3n+2) { rotate: .5deg; }
.pile > .card:nth-child(3n) { rotate: -.2deg; }

/* ---------- Card base ---------- */
.card {
	position: relative; background: var(--p); color: var(--ink);
	box-shadow: 0 1px 2px rgba(43, 29, 36, .12), 0 16px 26px -20px rgba(43, 29, 36, .55);
	transition: rotate .3s, translate .3s, box-shadow .3s;
}
.card:hover { rotate: 0deg; translate: 0 -3px; box-shadow: 0 1px 2px rgba(43, 29, 36, .12), 0 22px 34px -20px rgba(43, 29, 36, .6); }
.card__link { display: block; padding: 1.6rem 1.6rem 1.3rem; color: inherit; text-decoration: none; }
.card__kind { display: flex; align-items: center; gap: .45rem; font-family: var(--hand); font-size: 1.35rem; line-height: 1; color: var(--k); margin-bottom: .8rem; }
.card__kind .soort-icon { width: 18px; height: 18px; }
.card__title { font-size: 1.5rem; line-height: 1.2; margin: 0 0 .6rem; color: var(--night); }
.card__excerpt { font-family: var(--serif); font-size: 1rem; line-height: 1.6; color: var(--muted); margin: 0 0 1rem; }
.card__date { display: block; font-size: .85rem; color: var(--muted); }
.card__link:focus-visible { outline-offset: 4px; }

/* column: newspaper clipping with a torn bottom */
.card--column { margin-bottom: 2.8rem !important; }
.card--column::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
	background: linear-gradient(135deg, var(--p) 5px, transparent 5px) 0 0 / 10px 10px, linear-gradient(-135deg, var(--p) 5px, transparent 5px) 0 0 / 10px 10px;
}
.card--column .card__link { border-top: 3px double color-mix(in srgb, var(--k) 60%, transparent); margin: .8rem 1rem 0; padding: 1rem .6rem 1.2rem; }
.card--column .card__title { font-weight: 600; }

/* uit het leven: notepad with tape */
.card--uit-het-leven {
	background-image: repeating-linear-gradient(transparent 0 1.85rem, color-mix(in srgb, var(--k) 20%, transparent) 1.85rem calc(1.85rem + 1px));
	background-position: 0 .9rem;
}
.card--uit-het-leven::before {
	content: ""; position: absolute; top: -.7rem; left: 50%; width: 5.5rem; height: 1.4rem; translate: -50% 0; rotate: 3deg;
	background: color-mix(in srgb, var(--k) 40%, #fff); opacity: .8;
	clip-path: polygon(3% 0, 97% 4%, 100% 50%, 96% 100%, 2% 96%, 0 45%);
}
.card--uit-het-leven .card__title { font-family: var(--hand); font-size: 2rem; font-weight: 600; line-height: 1; }

/* gedicht: a small card with a frame, centered */
.card--gedicht .card__link { text-align: center; padding: 2rem 1.6rem; outline: 1px solid color-mix(in srgb, var(--k) 30%, transparent); outline-offset: -.6rem; }
.card--gedicht .card__kind { justify-content: center; }
.card--gedicht .card__title { font-style: italic; font-weight: 400; }
.card__poem { font-family: var(--serif); font-style: italic; font-size: 1rem; line-height: 1.75; color: var(--ink); margin: 0 0 1rem; }

/* kort verhaal: a book page with a drop cap */
.card--kort-verhaal { background-image: linear-gradient(90deg, rgba(43, 29, 36, .08), transparent 1.2rem); }
.card--kort-verhaal .card__title { text-align: center; }
.card--kort-verhaal .card__kind { justify-content: center; }
.card--kort-verhaal .card__excerpt::first-letter { float: left; font-family: var(--script); font-size: 3.4rem; line-height: .8; padding: .35rem .4rem 0 0; color: var(--k); }

/* brief: airmail edge and a stamp */
.card--brief { border: 7px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--k) 0 10px, var(--p) 10px 18px, #4F6F92 18px 28px, var(--p) 28px 36px) 7; }
.card--brief .card__link { padding-right: 4.2rem; }
.card--brief::after {
	content: ""; position: absolute; top: .9rem; right: .9rem; width: 2.6rem; height: 3.1rem; rotate: 6deg;
	background:
		radial-gradient(circle at 50% 42%, color-mix(in srgb, #fff 55%, transparent) 0 .5rem, transparent .55rem) center / calc(100% - 8px) calc(100% - 8px) no-repeat,
		linear-gradient(var(--k), var(--k)) center / calc(100% - 8px) calc(100% - 8px) no-repeat,
		radial-gradient(circle, transparent 2px, var(--k) 2.4px) -3.5px -3.5px / 7px 7px;
}

/* reeks: index card with a tab */
.card--op-zoek-naar-passie {
	margin-top: 1.6rem;
	background-image: repeating-linear-gradient(transparent 0 1.75rem, color-mix(in srgb, var(--k) 16%, transparent) 1.75rem calc(1.75rem + 1px));
	background-position: 0 .4rem;
}
.card--op-zoek-naar-passie .card__kind {
	position: absolute; top: -1.6rem; left: 1rem; height: 1.6rem; margin: 0; padding: .2rem .9rem 0;
	background: var(--p); border-radius: 6px 6px 0 0; font-size: 1.2rem; box-shadow: 0 -2px 4px -2px rgba(43, 29, 36, .15);
}
.card--op-zoek-naar-passie .card__title { margin: .2rem -1.6rem .8rem; padding: 0 1.6rem .5rem; border-bottom: 2px solid #D9534F; background: var(--p); }

/* ---------- Homepage: drawers + latest ---------- */
.drawers { list-style: none; margin: 0 0 clamp(3rem, 6vw, 4.5rem); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .drawers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .drawers { grid-template-columns: 1fr; } }
.drawer a {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .3rem .8rem;
	padding: 1.1rem 1.2rem; height: 100%; color: var(--ink); text-decoration: none;
	background: var(--paper); border-radius: 10px; border-top: 4px solid var(--k);
	box-shadow: 0 1px 2px rgba(43, 29, 36, .08); transition: translate .25s, box-shadow .25s;
}
.drawer a:hover { translate: 0 -3px; box-shadow: 0 14px 22px -16px rgba(43, 29, 36, .5); }
.drawer .soort-icon { color: var(--k); }
.drawer__name { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; color: var(--night); }
.drawer__count { font-family: var(--hand); font-size: 1.7rem; line-height: 1; color: var(--k); }
.drawer__desc { grid-column: 1 / -1; font-size: .92rem; color: var(--muted); line-height: 1.45; }
.writings__latest { font-family: var(--hand); font-weight: 400; font-size: 1.9rem; color: var(--accent); margin: 0 0 1.6rem; }

/* ---------- Single: the sheet on the desk ---------- */
.desk { padding: clamp(2rem, 5vw, 4rem) 0 var(--space); }
.desk__inner { max-width: calc(46rem + 2 * var(--gutter)); }
.desk__back { display: flex; gap: .6rem; color: var(--muted); font-size: .95rem; margin: 0 0 2rem; }
.desk__back a { color: inherit; }

.sheet {
	position: relative; background: var(--p); color: var(--ink);
	padding: clamp(2rem, 6vw, 4rem) clamp(1.4rem, 6vw, 4.2rem) clamp(2rem, 5vw, 3.2rem);
	box-shadow: 0 1px 2px rgba(43, 29, 36, .1), 0 30px 50px -34px rgba(43, 29, 36, .6);
}
.sheet__head { margin-bottom: 2rem; }
.sheet__kind { display: flex; align-items: center; gap: .5rem; font-family: var(--hand); font-size: 1.5rem; line-height: 1; color: var(--k); margin: 0 0 1rem; }
.sheet__title { font-size: clamp(2.1rem, 5vw, 3.2rem); margin: 0 0 .7rem; }
.sheet__date { color: var(--muted); font-size: .95rem; }
.sheet__image { margin: 0 0 2rem; }
.sheet__image img { width: 100%; }
.sheet__body { max-width: none; }
.sheet__body p, .sheet__body li { font-family: var(--serif); font-size: 1.08rem; line-height: 1.8; }
.sheet__body h3 { font-size: 1.35rem; margin: 2em 0 .5em; color: var(--k); }
.sheet__body .wp-block-image { margin: 2rem 0; }
.sheet__body .wp-block-image img { border-radius: 4px; }
.sheet__sign { font-family: var(--script); font-size: 2.6rem; line-height: 1; color: var(--k); margin: 1.6rem 0 0; rotate: -4deg; transform-origin: left; }
.wp-block-verse, .sheet__body pre {
	font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.9; white-space: pre-wrap;
	background: none; border: 0; padding: 0; margin: 0; overflow: visible; color: var(--ink);
}

/* column */
.sheet--column::before, .sheet--column::after {
	content: ""; position: absolute; left: 0; right: 0; height: 12px;
	background: linear-gradient(135deg, var(--p) 6px, transparent 6px) 0 0 / 12px 12px, linear-gradient(-135deg, var(--p) 6px, transparent 6px) 0 0 / 12px 12px;
}
.sheet--column::after { bottom: -12px; }
.sheet--column::before { top: -12px; rotate: 180deg; }
.sheet--column .sheet__head { border-top: 4px double color-mix(in srgb, var(--k) 70%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--k) 25%, transparent); padding: 1rem 0 1.2rem; }
.sheet--column .sheet__title { font-weight: 600; letter-spacing: -.02em; }
.sheet--column .sheet__body > p:first-of-type::first-letter { float: left; font-family: var(--serif); font-weight: 600; font-size: 3.9rem; line-height: .85; padding: .4rem .5rem 0 0; color: var(--night); }

/* uit het leven: notepad, lines line up with the text */
.sheet--uit-het-leven { --lh: 2rem; padding-top: 3.6rem; padding-left: clamp(2.2rem, 8vw, 5.2rem); }
.sheet--uit-het-leven .spiral {
	position: absolute; top: .9rem; left: 1.5rem; right: 1.5rem; height: 1rem;
	background: radial-gradient(circle at 50% 50%, var(--bg) 0 .32rem, color-mix(in srgb, var(--k) 25%, #d9cfc6) .34rem .42rem, transparent .44rem) 0 0 / 1.6rem 1rem repeat-x;
}
.sheet--uit-het-leven::before { content: ""; position: absolute; top: 0; bottom: 0; left: clamp(1.4rem, 6vw, 4rem); width: 2px; background: color-mix(in srgb, #D9534F 45%, transparent); }
.sheet--uit-het-leven .sheet__title { font-family: var(--hand); font-weight: 600; font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; }
.sheet--uit-het-leven .sheet__body {
	background-image: repeating-linear-gradient(transparent 0 calc(var(--lh) - 1px), color-mix(in srgb, var(--k) 22%, transparent) calc(var(--lh) - 1px) var(--lh));
}
.sheet--uit-het-leven .sheet__body p { line-height: var(--lh); margin: 0 0 var(--lh); font-size: 1.06rem; }
.sheet--uit-het-leven .sheet__body h3 { line-height: var(--lh); margin: 0; font-family: var(--hand); font-size: 1.7rem; font-weight: 600; }

/* gedicht */
.sheet--gedicht { text-align: center; outline: 1px solid color-mix(in srgb, var(--k) 30%, transparent); outline-offset: -1rem; }
.sheet--gedicht .sheet__kind { justify-content: center; }
.sheet--gedicht .sheet__title { font-style: italic; font-weight: 400; }
.sheet--gedicht .sheet__body { display: grid; justify-items: center; }
.sheet--gedicht .wp-block-verse { text-align: left; display: inline-block; }
.sheet--gedicht .sheet__sign { transform-origin: center; }

/* kort verhaal */
.sheet--kort-verhaal { background-image: linear-gradient(90deg, rgba(43, 29, 36, .1), transparent 2.2rem); }
.sheet--kort-verhaal .sheet__head { text-align: center; }
.sheet--kort-verhaal .sheet__kind { justify-content: center; }
.sheet--kort-verhaal .sheet__head::after { content: "\2042"; display: block; margin-top: 1.4rem; font-size: 1.6rem; color: var(--k); }
.sheet--kort-verhaal .sheet__body > p:first-of-type::first-letter { float: left; font-family: var(--script); font-size: 5.2rem; line-height: .8; padding: .5rem .6rem 0 0; color: var(--k); }
.sheet--kort-verhaal .sheet__body p { text-indent: 1.4em; margin: 0; }
.sheet--kort-verhaal .sheet__body > p:first-of-type { text-indent: 0; }

/* brief */
.sheet--brief { border: 10px solid transparent; border-image: repeating-linear-gradient(-45deg, var(--k) 0 14px, var(--p) 14px 24px, #4F6F92 24px 38px, var(--p) 38px 48px) 10; }
.sheet--brief .stamp {
	position: absolute; top: 1.4rem; right: 1.4rem; width: 4.4rem; height: 5.2rem; rotate: 7deg; z-index: 1;
	display: grid; place-items: center; align-content: center; gap: .15rem; color: #fff;
	background:
		linear-gradient(var(--k), var(--k)) center / calc(100% - 10px) calc(100% - 10px) no-repeat,
		radial-gradient(circle, transparent 2.6px, var(--k) 3px) -4.5px -4.5px / 9px 9px;
	filter: drop-shadow(0 2px 2px rgba(43, 29, 36, .2));
}
.sheet--brief .stamp span { font-family: var(--script); font-size: 1.5rem; line-height: 1; }
.sheet--brief .sheet__head { padding-right: 4.5rem; }
.sheet--brief .sheet__body > p:first-of-type { font-family: var(--script); font-size: 1.9rem; line-height: 1.3; color: var(--night); }

/* reeks */
.sheet--op-zoek-naar-passie {
	margin-top: 2.4rem;
}
.sheet--op-zoek-naar-passie .tab {
	position: absolute; top: -2.2rem; left: 2rem; height: 2.2rem; padding: .3rem 1.2rem 0;
	background: var(--p); border-radius: 8px 8px 0 0; font-family: var(--hand); font-size: 1.5rem; color: var(--k);
	box-shadow: 0 -3px 6px -3px rgba(43, 29, 36, .2);
}
.sheet--op-zoek-naar-passie .sheet__head { margin-inline: calc(-1 * clamp(1.4rem, 6vw, 4.2rem)); padding: 0 clamp(1.4rem, 6vw, 4.2rem) 1.2rem; border-bottom: 2px solid #D9534F; }

/* reeks navigation */
.reeks { margin-top: 3rem; padding: 1.6rem 1.8rem; background: var(--paper); border-left: 3px solid var(--k-reeks); }
.reeks__title { font-family: var(--hand); font-size: 1.6rem; color: var(--k-reeks); margin: 0 0 .8rem; }
.reeks__list { margin: 0; padding-left: 1.6rem; columns: 2 14rem; column-gap: 2rem; }
.reeks__list li { margin-bottom: .35rem; break-inside: avoid; }
.reeks__list a { color: var(--ink); text-decoration: none; }
.reeks__list a:hover { text-decoration: underline; }
.reeks__list .is-current a { color: var(--k-reeks); font-weight: 600; }

/* prev / next */
.pager { display: flex; justify-content: space-between; gap: 2rem; margin-top: 3rem; }
.pager a { max-width: 48%; font-family: var(--serif); font-size: 1.15rem; color: var(--night); text-decoration: none; line-height: 1.3; }
.pager a span { display: block; font-family: var(--hand); font-size: 1.4rem; color: var(--accent); }
.pager a:hover { text-decoration: underline; }
.pager__next { margin-left: auto; text-align: right; }

/* ---------- Bookmarks (Even voorstellen) ---------- */
.bookmarks { padding-top: 0; }
.bookmarks__row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 1.5rem); align-items: start; margin-top: 2.5rem; }
.bookmark {
	--c: var(--k-column);
	position: relative; padding: 2.4rem 1.2rem 3.4rem; color: #fff; background: var(--c);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 1.4rem), 0 100%);
	min-height: 19rem;
}
.bookmark:nth-child(1) { --c: var(--accent); }
.bookmark:nth-child(2) { --c: #5F7F67; margin-top: 2rem; }
.bookmark:nth-child(3) { --c: #94651F; margin-top: .6rem; }
.bookmark:nth-child(4) { --c: #4F6F92; margin-top: 2.6rem; }
.bookmark:nth-child(5) { --c: #8A6A9A; margin-top: 1.2rem; }
.bookmark::before { /* the hole for the ribbon */
	content: ""; position: absolute; top: .9rem; left: 50%; width: .7rem; height: .7rem; translate: -50% 0; border-radius: 50%; background: var(--bg);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3);
}
.bookmark__title { font-family: var(--hand); font-weight: 600; font-size: 1.75rem; line-height: 1.05; color: #fff; margin: 0 0 .8rem; }
.bookmark__text { font-size: .98rem; line-height: 1.55; margin: 0; color: rgba(255, 255, 255, .92); }
@media (max-width: 980px) {
	.bookmarks__row { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter) 1rem; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: thin; }
	.bookmark { flex: 0 0 min(15rem, 70vw); scroll-snap-align: start; }
}

/* ---------- Cart ---------- */
.cart-link { position: relative; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; margin-left: auto; color: inherit; border-radius: 50%; }
.cart-link:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.cart-count {
	position: absolute; top: .05rem; right: -.1rem; min-width: 1.2rem; height: 1.2rem; padding: 0 .3rem; border-radius: 999px;
	background: var(--accent); color: #fff; font: 600 .72rem/1.2rem var(--sans); text-align: center;
}
.cart-count.is-empty { display: none; }
.site-header__inner .site-nav { order: 2; }
.site-header__inner .cart-link { order: 3; margin-left: 1rem; }
.site-header__inner .nav-toggle { order: 4; }
@media (max-width: 760px) { .site-header__inner .cart-link { margin-left: auto; } }

.toast {
	position: fixed; left: 50%; bottom: 1.5rem; z-index: 1000; translate: -50% 150%;
	display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.2rem; max-width: calc(100% - 2rem);
	padding: .9rem 1.3rem; border-radius: 14px; background: var(--night); color: #fff; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .5);
	transition: translate .35s cubic-bezier(.2, .8, .2, 1);
}
.toast.is-on { translate: -50% 0; }
.toast p { margin: 0; }
.toast a { color: var(--glow); font-weight: 600; }

@media (max-width: 640px) {
	.sheet--brief .stamp { width: 3.2rem; height: 3.9rem; top: 1rem; right: 1rem; }
}
@media (min-width: 761px) { .site-header__inner .site-nav { margin-left: auto; } }
