/* ==========================================================================
   Thema Bossink — licht en donker (volgt automatisch het systeem)
   ========================================================================== */

/* --- Lettertypen (lokaal, niets via Google) --- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); }

/* --- Kleuren --- */
:root {
  color-scheme: light dark;
  --bg: #F5F7F6; --card: #FFFFFF; --line: #E2E8E5; --line2: #EEF2F0;
  --ink: #16211D; --ink2: #34413C; --muted: #5B6762;
  --accent: #0B6E5A; --accent-dark: #074D3F; --accent-soft: #E3F1EC; --on-accent: #FFFFFF;
  --field: #FFFFFF; --field-line: #C9D5D0; --thumb: #DDE6E2;
  --dark: #16211D; --dark-soft: #D7E6E0; --dark-muted: #A9C9BE;
  --on: #3FBF95; --off: #2C3A35;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1412; --card: #17201D; --line: #26322E; --line2: #1F2926;
    --ink: #E4ECE8; --ink2: #C2CFC9; --muted: #95A69F;
    --accent: #4CC9A4; --accent-dark: #7EDDC0; --accent-soft: #173A30; --on-accent: #0E1412;
    --field: #0E1412; --field-line: #34433E; --thumb: #24302C;
    --dark: #0F2B23; --dark-soft: #CFE3DB; --dark-muted: #8FC2B1;
    --on: #4CC9A4; --off: #1E3A31;
  }
}

/* --- Basis --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--head); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.5px; margin: 0 0 16px; }
h2 { font-size: 24px; margin: 32px 0 12px; }
h3 { font-size: 19px; margin: 24px 0 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--on-accent); }
.skip:focus { top: 12px; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* --- Header --- */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.logo { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.brand-text { display: flex; flex-direction: column; }
.brand-text b { font-family: var(--head); font-size: 22px; line-height: 1.15; }
.brand-text small { font-size: 13px; color: var(--muted); }

.main-nav { flex: 1 1 auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; flex-wrap: wrap; gap: 4px; }
.main-nav li { position: relative; }
.main-nav a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 8px; font-weight: 500; color: var(--ink); }
.main-nav a:hover { text-decoration: none; background: var(--bg); }
.main-nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 210px; padding: 6px !important; margin-top: 4px !important;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); }
.dropdown a { display: flex; width: 100%; background: transparent !important; }
.dropdown a:hover, .dropdown a.active { background: var(--accent-soft) !important; color: var(--accent); }
.has-sub:hover > .dropdown, .has-sub:focus-within > .dropdown { display: block; }
/* brug over het gat tussen knop en menu, zodat hover niet wegvalt */
.has-sub::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }

.search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--field-line); color: var(--muted); }
.search input { border: 0; background: transparent; font: inherit; font-size: 15px; width: 150px; color: var(--ink); outline: none; }
.search:focus-within { border-color: var(--accent); }

/* --- Submenu (tabs) --- */
.subnav { background: var(--card); border-bottom: 1px solid var(--line); }
.subnav nav { display: flex; gap: 4px; overflow-x: auto; }
.subnav a { flex: 0 0 auto; padding: 14px 12px; font-weight: 500; font-size: 15px; color: var(--ink2); border-bottom: 2px solid transparent; }
.subnav a:hover { text-decoration: none; color: var(--accent); }
.subnav a.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* --- Layout met zijbalk --- */
.layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; padding-top: 40px; padding-bottom: 64px; }
.content { flex: 999 1 560px; min-width: 0; }
.sidebar { flex: 1 1 280px; display: flex; flex-direction: column; gap: 20px; }

/* --- Inhoud --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.kicker { display: inline-block; margin-bottom: 6px; font-family: var(--mono); font-size: 14px; font-weight: 600; color: var(--accent); }
.meta { color: var(--muted); font-size: 15px; margin-top: -8px; }
.prose { color: var(--ink2); }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose img { display: block; margin: 24px auto; border-radius: 12px; }
.prose blockquote { margin: 16px 0; padding: 8px 16px; border-radius: 10px; background: var(--accent-soft); }
.prose code { font-family: var(--mono); font-size: .92em; }
.prose table { border-collapse: collapse; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 24px 0; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Knoppen: ook bruikbaar vanuit markdown met [tekst](/link?classes=btn,primary) */
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; margin: 4px 8px 4px 0; border-radius: 10px;
  border: 1px solid var(--field-line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn:hover { text-decoration: none; filter: brightness(.94); color: inherit; }
.btn.primary:hover { color: var(--on-accent); }

/* --- Homepage --- */
.hero { padding: clamp(24px, 5vw, 40px); margin-bottom: 32px; }
.lead { font-size: 18px; }
.lead p:last-child { margin-bottom: 0; }
.home-section { margin-bottom: 32px; }
.home-section h2 { margin: 0 0 16px; }
.home-section h2 a { color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 20px; min-height: 132px; color: var(--ink); }
.tile:hover, .post:hover, .result:hover { text-decoration: none; border-color: var(--accent); color: var(--ink); }
.tag { align-self: flex-start; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 600; font-size: 14px; }
.tile b { font-size: 17px; }
.tile-text { font-size: 14px; color: var(--muted); line-height: 1.45; }

.posts, .results { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.post { display: flex; gap: 20px; align-items: center; padding: 16px; color: var(--ink); }
.thumb { flex: 0 0 120px; width: 120px; height: 80px; border-radius: 10px; background: var(--thumb); object-fit: cover; }
.post small { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.post b { font-size: 17px; line-height: 1.35; }
.result { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; color: var(--ink); }
.result span { color: var(--muted); font-size: 15px; }

/* --- Formulieren (zoekpagina) --- */
.find { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.find-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 240px; }
.find-field label { font-size: 14px; font-weight: 600; }
.find-field input { height: 44px; padding: 0 12px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; }
.find .btn { margin: 0; }

/* --- Footer --- */
.site-footer { background: var(--card); border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; color: var(--muted); }

/* --- Telefoon --- */
@media (max-width: 700px) {
  .head { gap: 12px; }
  .main-nav { order: 3; flex-basis: 100%; }
  .main-nav > ul { overflow-x: auto; flex-wrap: nowrap; }
  .main-nav a { padding: 0 12px; }
  /* geen uitklapmenu op touch: de tabs onder de header doen dat werk */
  .has-sub:hover > .dropdown, .has-sub:focus-within > .dropdown { display: none; }
  .main-nav a svg { display: none; }
  .search { margin-left: auto; }
  .search input { width: 110px; }
  .layout { padding-top: 24px; }
  .post { gap: 14px; }
  .thumb { flex-basis: 88px; width: 88px; height: 64px; }
}

/* Een shortcode met een blok (bv. [youtube]) los op een regel laat lege <p>-tjes achter */
.prose p:empty { display: none; }
