/**
 * Base styles: reset, typography defaults, layout primitives and the shared
 * UI components (buttons, chips, paw marks, meta labels, hatch, prose).
 *
 * Screen-specific layout lives in templates.css; each block ships its own
 * style.css for anything unique to that block.
 */

/* ------------------------------------------------------------------ *
 * Reset / document
 * ------------------------------------------------------------------ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body.dk-body {
	margin: 0;
	background: var(--dk-paper);
	color: var(--dk-text);
	font-family: var(--dk-font-sans);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	min-height: 100vh;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--dk-green);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

button {
	font: inherit;
	cursor: pointer;
}

h1, h2, h3, h4, h5 {
	font-family: var(--dk-font-serif);
	font-weight: 500;
	color: var(--dk-ink);
	margin: 0;
	text-wrap: pretty;
}

p {
	text-wrap: pretty;
}

/* ------------------------------------------------------------------ *
 * Accessibility
 * ------------------------------------------------------------------ */
.dk-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--dk-ink);
	color: var(--dk-paper-light);
	font-size: 14px;
	padding: 12px 18px;
}

.dk-skip-link:focus {
	left: 0;
}

:where(a, button, [role="button"], input, textarea, select, summary):focus-visible {
	outline: 2px solid var(--dk-green);
	outline-offset: 3px;
	border-radius: 1px;
}

.dk-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

#inhoud {
	scroll-margin-top: 120px;
}

/* ------------------------------------------------------------------ *
 * Layout primitives
 * ------------------------------------------------------------------ */
.dk-container {
	max-width: var(--dk-content-max);
	margin-inline: auto;
	padding-inline: var(--dk-gutter);
}

.dk-stack {
	display: flex;
	flex-direction: column;
}

.dk-section {
	padding-block: 44px;
}

/* Two-column content + sidebar shells (widths per handoff). */
.dk-grid-sidebar {
	display: grid;
	grid-template-columns: 1fr 330px;
	gap: 44px;
	align-items: start;
}

.dk-grid-sidebar--article {
	grid-template-columns: 1fr 340px;
}

.dk-sidebar-sticky {
	position: sticky;
	top: var(--dk-header-h);
}

/* ------------------------------------------------------------------ *
 * Meta label (JetBrains Mono, uppercase, tracked)
 * ------------------------------------------------------------------ */
.dk-meta {
	font-family: var(--dk-font-mono);
	font-size: var(--dk-meta-size);
	letter-spacing: var(--dk-meta-tracking);
	text-transform: uppercase;
	color: var(--dk-text-light);
	line-height: 1.4;
}

.dk-kicker {
	font-family: var(--dk-font-mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--dk-ocher);
}

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */
.dk-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-family: var(--dk-font-sans);
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	padding: 13px 22px;
	border: 1.5px solid transparent;
	border-radius: var(--dk-radius);
	cursor: pointer;
	transition: background var(--dk-t), color var(--dk-t), border-color var(--dk-t), transform var(--dk-t);
	text-align: center;
}

.dk-btn:hover {
	text-decoration: none;
	transform: translateY(-1px);
}

.dk-btn--primary {
	background: var(--dk-green);
	color: var(--dk-paper-light);
}

.dk-btn--primary:hover {
	background: var(--dk-green-hover);
	color: var(--dk-paper-light);
}

.dk-btn--outline {
	border-color: var(--dk-ink);
	color: var(--dk-ink);
	padding: 11.5px 20px;
}

.dk-btn--outline:hover {
	background: var(--dk-ink);
	color: var(--dk-paper-light);
}

.dk-btn--pill {
	border-radius: var(--dk-radius-pill);
	padding: 10px 16px;
	font-size: 13.5px;
}

.dk-btn--sm {
	font-size: 13.5px;
	padding: 9px 16px;
}

/* Text link with arrow ("Alle artikelen →") */
.dk-textlink {
	font-size: 13.5px;
	font-weight: 500;
	color: var(--dk-green);
	transition: color var(--dk-t);
}

/* ------------------------------------------------------------------ *
 * Chips / filter pills
 * ------------------------------------------------------------------ */
.dk-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.dk-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 13.5px;
	color: var(--dk-text-grey);
	background: transparent;
	border: 1px solid var(--dk-border-soft);
	border-radius: var(--dk-radius-pill);
	padding: 7px 15px;
	cursor: pointer;
	transition: background var(--dk-t), color var(--dk-t), border-color var(--dk-t);
	text-decoration: none;
}

.dk-chip:hover {
	background: var(--dk-paper-accent);
	text-decoration: none;
}

.dk-chip[aria-pressed="true"],
.dk-chip.is-active {
	background: var(--dk-ink);
	border-color: var(--dk-ink);
	color: var(--dk-paper-light);
}

/* ------------------------------------------------------------------ *
 * Cards
 * ------------------------------------------------------------------ */
.dk-card {
	background: var(--dk-paper-light);
	border: 1px solid var(--dk-border);
	border-radius: var(--dk-radius);
}

.dk-card--link {
	display: block;
	cursor: pointer;
	transition: transform 220ms var(--dk-ease), border-color 220ms, box-shadow 220ms;
	color: inherit;
}

.dk-card--link:hover {
	transform: translateY(-2px);
	border-color: var(--dk-border-xlight);
	box-shadow: 0 10px 30px rgba(27, 26, 23, 0.06);
	text-decoration: none;
}

/* ------------------------------------------------------------------ *
 * Hatch placeholder (stand-in for imagery in the design)
 * ------------------------------------------------------------------ */
.dk-hatch {
	background: repeating-linear-gradient(
		135deg,
		var(--dk-hatch-a) 0,
		var(--dk-hatch-a) 8px,
		var(--dk-hatch-b) 8px,
		var(--dk-hatch-b) 16px
	);
}

/* Media wrapper keeps the design's hatch behind any real uploaded image. */
.dk-media {
	position: relative;
	overflow: hidden;
	background: repeating-linear-gradient(
		135deg,
		var(--dk-hatch-a) 0,
		var(--dk-hatch-a) 8px,
		var(--dk-hatch-b) 8px,
		var(--dk-hatch-b) 16px
	);
}

.dk-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ------------------------------------------------------------------ *
 * Author avatar (user field dk_avatar) – always fills its round holder
 * ------------------------------------------------------------------ */
.dk-avatar {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
}

/* ------------------------------------------------------------------ *
 * Paw mark (brand icon) + logo tile – markup generated by dk_paw()/dk_logo()
 * ------------------------------------------------------------------ */
.dk-paw {
	position: relative;
	display: inline-block;
	flex: 0 0 auto;
}

/* Geometry comes from inline styles in dk_paw(); CSS only positions them. */
.dk-paw__pad,
.dk-paw__toe {
	position: absolute;
}

.dk-paw__toe {
	border-radius: 50%;
}

.dk-logo {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--dk-ink);
}

.dk-logo:hover {
	text-decoration: none;
}

.dk-logo__tile {
	position: relative;
	display: inline-block; /* so width/height apply even outside a flex context */
	width: 40px;
	height: 40px;
	background: var(--dk-green);
	border-radius: var(--dk-radius-logo);
	flex: 0 0 auto;
	vertical-align: middle;
}

.dk-logo__word {
	font-family: var(--dk-font-serif);
	font-size: 26px;
	line-height: 1;
	color: var(--dk-ink);
}

/* ------------------------------------------------------------------ *
 * Ad placement (labelled, restrained – never above the first heading)
 * ------------------------------------------------------------------ */
.dk-ad {
	border: 1px dashed var(--dk-border-dashed);
	background: var(--dk-paper-warm);
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.dk-ad__label {
	font-family: var(--dk-font-mono);
	font-size: 9.5px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--dk-text-lighter);
	flex: 0 0 auto;
}

.dk-ad__slot {
	flex: 1 1 auto;
	background: repeating-linear-gradient(
		135deg,
		var(--dk-hatch-ad-a) 0,
		var(--dk-hatch-ad-a) 10px,
		var(--dk-hatch-ad-b) 10px,
		var(--dk-hatch-ad-b) 20px
	);
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 90px;
	font-family: var(--dk-font-mono);
	font-size: 11px;
	color: var(--dk-text-muted-2);
}

.dk-ad--box .dk-ad__slot {
	min-height: 250px;
}

/* ------------------------------------------------------------------ *
 * Shared surface utilities (used across several blocks)
 * ------------------------------------------------------------------ */
.dk-dark {
	background: var(--dk-dark-bg);
	color: var(--dk-dark-text);
}

.dk-dark a {
	color: var(--dk-ocher-bright);
}

/* Headings default to --dk-ink, which is the dark background itself. */
.dk-dark h1,
.dk-dark h2,
.dk-dark h3,
.dk-dark h4 {
	color: var(--dk-dark-text);
}

/* Buttons on a dark surface: the default variants use dark ink, so invert. */
.dk-dark .dk-btn--primary {
	background: var(--dk-ocher);
	color: var(--dk-ink);
}

.dk-dark .dk-btn--primary:hover {
	background: var(--dk-ocher-bright);
	color: var(--dk-ink);
}

.dk-dark .dk-btn--outline {
	border-color: var(--dk-dark-text-soft);
	color: var(--dk-dark-text);
}

.dk-dark .dk-btn--outline:hover {
	background: var(--dk-dark-text);
	color: var(--dk-ink);
}

.dk-green-panel {
	background: var(--dk-green-light);
	border: 1px solid var(--dk-green-border);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	border-radius: var(--dk-radius);
}

/* ------------------------------------------------------------------ *
 * Prose (article body – core blocks rendered inside .dk-prose)
 * ------------------------------------------------------------------ */
.dk-prose {
	font-size: 17px;
	line-height: 1.72;
	color: var(--dk-text);
}

.dk-prose > * + * {
	margin-top: 1.2em;
}

.dk-prose h2 {
	font-size: 27px;
	margin-top: 1.7em;
	line-height: 1.2;
}

.dk-prose h3 {
	font-size: 21px;
	margin-top: 1.5em;
}

.dk-prose a {
	color: var(--dk-green);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--dk-green-border);
}

.dk-prose img {
	border-radius: var(--dk-radius);
}

.dk-prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--dk-ocher);
	font-family: var(--dk-font-serif);
	font-size: 21px;
	line-height: 1.4;
	color: var(--dk-ink);
}

.dk-prose ul,
.dk-prose ol {
	padding-left: 1.3em;
}

.dk-prose li + li {
	margin-top: 0.4em;
}

.dk-prose figure figcaption {
	font-family: var(--dk-font-mono);
	font-size: 11px;
	letter-spacing: 0.06em;
	color: var(--dk-text-light);
	margin-top: 8px;
}

/* ------------------------------------------------------------------ *
 * Animations (respect reduced motion)
 * ------------------------------------------------------------------ */
@keyframes dk-rise {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

@keyframes dk-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-7px); }
}

@keyframes dk-pad {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.22); }
}

@keyframes dk-sway {
	0%, 100% { transform: rotate(-14deg); }
	50% { transform: rotate(14deg); }
}

@keyframes dk-marquee {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
