/* Huisstijl "Thomas": tokens uit het design system, componenten uit bundle.css.
   Lettertypen staan lokaal (assets/fonts), er worden geen externe verzoeken gedaan. */

/* ---------- Lettertypen ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-italic-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --surface: #faf6f0;
  --surface-sunk: #f1e9de;
  --ink: #2a211b;
  --ink-muted: #6b5d52;
  --line: #ddd0c0;
  --line-strong: #8a7a6a;
  --accent: #a94d2a;
  --accent-strong: #8a3a1b;
  --on-accent: #fffaf4;
  --sage: #5d6840;
  --ochre: #d9a441;
  --clay-tint: #ecd3c3;
  --focus: var(--accent-strong);
  /* Aanvulling op het design system: tekst op `ochre` (ink haalt dat in het donkere thema niet). */
  --on-ochre: #2a211b;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 120px;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-soft: 0 1px 2px #2a211b14, 0 12px 28px -14px #2a211b33;

  --measure: 680px;
  --container: 960px;
  --container-wide: 1280px;
  --gutter: var(--space-5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --surface: #1e1915;
    --surface-sunk: #28211c;
    --ink: #f2eadf;
    --ink-muted: #b5a797;
    --line: #3d342c;
    --line-strong: #8b7b6a;
    --accent: #e08a62;
    --accent-strong: #f0a47f;
    --on-accent: #1e1915;
    --sage: #a3b07a;
    --ochre: #e0b255;
    --clay-tint: #5a3a2a;
    --on-ochre: #1e1915;
    --shadow-soft: 0 1px 2px #00000040, 0 12px 28px -14px #00000099;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #1e1915;
  --surface-sunk: #28211c;
  --ink: #f2eadf;
  --ink-muted: #b5a797;
  --line: #3d342c;
  --line-strong: #8b7b6a;
  --accent: #e08a62;
  --accent-strong: #f0a47f;
  --on-accent: #1e1915;
  --sage: #a3b07a;
  --ochre: #e0b255;
  --clay-tint: #5a3a2a;
  --on-ochre: #1e1915;
  --shadow-soft: 0 1px 2px #00000040, 0 12px 28px -14px #00000099;
}

@media (min-width: 720px) {
  :root { --gutter: var(--space-7); }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font: 400 17px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

img, svg { max-width: 100%; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

a { color: var(--accent-strong); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.wide { max-width: var(--container-wide); }

.skip {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  background: var(--surface-sunk);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink);
}
.skip:focus { top: var(--space-4); }

/* ---------- Typografie ---------- */
.display-xl {
  font: 400 clamp(2.75rem, 8.5vw, 4rem) / 1.05 var(--font-display);
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.02em;
}
.display-lg {
  font: 400 clamp(2.125rem, 6vw, 2.75rem) / 1.1 var(--font-display);
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.015em;
}
.heading {
  font: 400 1.75rem / 1.2 var(--font-display);
  font-variation-settings: "opsz" 36;
  letter-spacing: -0.01em;
}
.body-lg { font-size: 19px; line-height: 1.6; }
.small { font-size: 14px; line-height: 1.5; }
.meta { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.label {
  font-size: 13px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lede { max-width: var(--measure); color: var(--ink); }

/* ---------- Componenten (uit bundle.css) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 14px 24px; border: 1px solid transparent; border-radius: var(--radius-pill);
  font: 500 16px/1 var(--font-sans); cursor: pointer; text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-sunk); }
.btn-quiet {
  background: transparent; color: var(--accent-strong);
  padding-left: var(--space-2); padding-right: var(--space-2);
  text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px;
}
.btn-quiet:hover { text-decoration-thickness: 2px; }

.link {
  color: var(--accent-strong); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 0.25em;
}
.link:hover { text-decoration-thickness: 2px; }

.card {
  position: relative;
  background: var(--surface-sunk); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: var(--space-5); color: var(--ink); display: flex; flex-direction: column; gap: var(--space-3);
  transition: border-color 150ms ease;
}
.card:hover { border-color: var(--line-strong); }
.card-title { font: 400 1.75rem / 1.2 var(--font-display); font-variation-settings: "opsz" 36; letter-spacing: -0.01em; margin: 0; }
.card-meta { font: 400 14px/1.5 var(--font-sans); color: var(--ink-muted); margin: 0; }
.card-body { font: 400 17px/1.6 var(--font-sans); margin: 0; }
/* De hele kaart klikbaar via de titel. */
.card-title a { color: inherit; text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-title a:focus-visible { outline: none; }
.card:has(.card-title a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }

.tag {
  display: inline-block; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
  font: 600 13px/1.4 var(--font-sans); letter-spacing: 0.04em; background: var(--clay-tint); color: var(--ink);
}
.tag-sage { background: transparent; color: var(--sage); border: 1px solid var(--sage); }

/* ---------- Kop en voet ---------- */
.site-header { padding-block: var(--space-5); }
.site-header .container {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-2) var(--space-5);
}
.wordmark {
  font: 400 1.75rem / 1 var(--font-display);
  font-variation-settings: "opsz" 36;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { color: var(--accent-strong); }
.site-nav { display: flex; gap: var(--space-1); margin-inline: calc(var(--space-3) * -1); }
.site-nav a {
  padding: var(--space-3);
  font-size: 13px; line-height: 1.4; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink); text-decoration: none;
  transition: color 150ms ease;
}
.site-nav a:hover { color: var(--accent-strong); }
.site-nav a[aria-current="page"] {
  color: var(--accent-strong);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.5em;
}

.site-footer { margin-top: var(--space-9); padding-block: var(--space-6) var(--space-7); }
.site-footer p { font-size: 14px; color: var(--ink-muted); }

/* ---------- Pagina's ---------- */
.page-head { padding-top: var(--space-8); }
.page-head .lede { margin-top: var(--space-4); }
.section { margin-top: var(--space-8); }
.section > .heading { margin-bottom: var(--space-6); }

/* Homepage */
.hero {
  display: grid;
  gap: var(--space-7);
  align-items: center;
  padding-top: var(--space-8);
}
.hero-copy .lede { margin-top: var(--space-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-6); }
.hero-art { width: 100%; max-width: 220px; height: auto; }
.hero-art .a-clay { fill: var(--clay-tint); }
.hero-art .a-ochre { fill: var(--ochre); }
.hero-art .a-sage { fill: var(--sage); }
.hero-art .a-accent { fill: var(--accent); }

@media (min-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr) 340px; padding-top: var(--space-9); }
  .hero-art { max-width: 340px; justify-self: end; }
}

.card-grid { display: grid; gap: var(--space-5); }
@media (min-width: 720px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
  .card-grid .card-wide { grid-column: 1 / -1; }
}

/* Bloglijst */
.posts { list-style: none; margin: 0; padding: 0; }
.post-item { padding-block: var(--space-6); border-top: 1px solid var(--line); max-width: var(--measure); }
.post-item:last-child { border-bottom: 1px solid var(--line); }
.post-item .heading { margin-top: var(--space-1); }
.post-item .heading a {
  color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em;
  transition: color 150ms ease;
}
.post-item .heading a:hover { color: var(--accent-strong); text-decoration-thickness: 2px; }
.post-item p:last-child { margin-top: var(--space-3); }

/* Artikel */
.article-head { padding-top: var(--space-8); max-width: var(--measure); }
.article-head .meta .tag { margin-left: var(--space-2); }
.article-head .display-lg { margin-top: var(--space-4); }
.article-head .lede { margin-top: var(--space-4); }

.prose { max-width: var(--measure); margin-top: var(--space-7); font-size: 19px; line-height: 1.6; }
.prose > * + * { margin-top: var(--space-5); }
.prose h2 { font: 400 1.75rem / 1.2 var(--font-display); font-variation-settings: "opsz" 36; letter-spacing: -0.01em; margin-top: var(--space-7); }
.prose h2 + * { margin-top: var(--space-4); }
.prose a { color: var(--accent-strong); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: var(--space-2); }
.prose blockquote {
  margin-inline: 0; padding: var(--space-5) var(--space-6);
  background: var(--surface-sunk); border-radius: var(--radius-lg);
  font: 400 1.5rem / 1.35 var(--font-display); font-variation-settings: "opsz" 36;
}
.prose code {
  font: 400 0.875em var(--font-mono);
  background: var(--surface-sunk); padding: 0.1em 0.35em; border-radius: var(--radius-sm);
}
.prose pre {
  background: var(--surface-sunk); border-radius: var(--radius-sm);
  padding: var(--space-4); overflow-x: auto; font-size: 15px; line-height: 1.5;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.article-foot { max-width: var(--measure); margin-top: var(--space-8); }
.article-foot .btn-quiet { margin-left: calc(var(--space-2) * -1); }

/* Tools */
.empty { max-width: var(--measure); }

/* 404 */
.notfound { padding-top: var(--space-9); max-width: var(--measure); }
.notfound .lede { margin-top: var(--space-4); }
.notfound .btn { margin-top: var(--space-6); }

@media (max-width: 719px) {
  .page-head, .article-head { padding-top: var(--space-7); }
  .site-footer { margin-top: var(--space-8); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
