/*
Theme Name: Boekenreeks
Description: Eigen thema voor boekenreeks.nl (stijl "Linnen band"): reekspagina's met leesvolgorde, samenvattingen en FAQ.
Version: 1.0.0
Author: VelaVen Marketing
Text Domain: boekenreeks
Requires PHP: 8.0
*/

:root {
  --paper: #FFFDF9;
  --white: #FFFFFF;
  --paper-2: #EDE4D1;
  --card: #F6F1E7;
  --line: #E3D9C6;
  --line-2: #E6DCC9;
  --line-3: #CFC3AE;
  --ink: #2B2620;
  --muted: #6B6152;
  --green: #1F4D3A;
  --green-d: #123226;
  --gold: #E9CF86;
  --gold-line: #D9B65C;
  --shelf: #5B4A2E;
  --head: 'Archivo', system-ui, sans-serif;
  --body: 'Literata', Georgia, serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.65; }
img { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-d); }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--card); padding: 8px 12px; }
:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 2px; }

/* header */
.site-head { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.site-head .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; padding-top: 16px; padding-bottom: 16px; font-family: var(--head); }
.logo { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-weight: 900; font-size: 24px; letter-spacing: -0.01em; }
.logo:hover { color: var(--ink); }
.logo-mark { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.logo-text { line-height: 1; }
.logo i { display: block; width: 7px; border-radius: 2px; }
.logo i:nth-child(1) { height: 22px; background: var(--green); }
.logo i:nth-child(2) { height: 26px; background: #7A2E2E; }
.logo i:nth-child(3) { height: 18px; background: #2C3E6B; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.nav a { font-weight: 700; font-size: 15px; text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.head-search { display: flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--line-3); border-radius: 6px; padding: 6px 10px; }
.head-search input { border: 0; background: transparent; font: inherit; font-family: var(--head); font-size: 15px; width: 210px; outline: none; color: var(--ink); }
.head-search button { border: 0; background: none; padding: 4px; cursor: pointer; display: grid; place-items: center; min-width: 32px; min-height: 32px; }

/* hero */
.hero { background: linear-gradient(rgba(237, 228, 209, .80), rgba(237, 228, 209, .92)), url(assets/img/header-boekenkast.webp) center / cover no-repeat var(--paper-2); }
@media (max-width: 800px) { .hero { background-image: linear-gradient(rgba(237, 228, 209, .80), rgba(237, 228, 209, .92)), url(assets/img/header-boekenkast-800.webp); } }
.hero .wrap { padding-top: 36px; }
.crumbs { margin: 0 0 8px; font-family: var(--head); font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--green); }
.hero h1 { font-weight: 900; font-size: clamp(36px, 6vw, 72px); line-height: 0.98; letter-spacing: -0.03em; margin: 0 0 14px; text-transform: uppercase; color: var(--green); }
.hero .lead { max-width: 680px; font-size: 18px; margin: 0 0 28px; }
.hero .facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; font-family: var(--head); font-size: 14px; font-weight: 700; }
.hero .facts li { border: 1px solid var(--line-3); background: var(--white); border-radius: 99px; padding: 4px 14px; }
.hero.plain { padding-bottom: 40px; }
.hero.plain h1 { font-size: clamp(32px, 5vw, 56px); }
.shelf-board { height: 14px; background: var(--shelf); }

/* spines */
.shelf { display: flex; align-items: flex-end; gap: 5px; overflow-x: auto; scrollbar-width: thin; }
.spine { flex: 1 0 96px; max-width: 170px; background: var(--c, var(--green)); color: var(--paper); text-decoration: none; border-radius: 3px 3px 0 0; border-top: 6px solid var(--gold-line); padding: 12px 10px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; font-family: var(--head); transition: transform .15s ease; }
.spine:hover, .spine:focus-visible { color: var(--paper); transform: translateY(-6px); }
.spine.upcoming { opacity: .55; }
.spine .n { font-weight: 900; font-size: 28px; line-height: 1; color: var(--gold); }
.spine .t { font-weight: 700; font-size: 13px; line-height: 1.2; }
/* Homepage: de plank past altijd zonder scrollen; op smallere schermen staan er minder ruggen op. */
.shelf.series { overflow: visible; }
.shelf.series .spine { flex: 1 1 0; min-width: 0; max-width: 170px; }
.shelf.series .spine:nth-child(n+9) { display: none; }
.shelf.series .spine .t { overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 900px) { .shelf.series .spine:nth-child(n+7) { display: none; } }
@media (max-width: 560px) { .shelf.series .spine:nth-child(n+5) { display: none; } }
.shelf.series .spine .t { font-size: 15px; }

/* main content */
main { padding-bottom: 80px; }
.sec { margin-top: 56px; }
.sec:first-child { margin-top: 48px; }
.sec > h2, .sec-head h2, .h2 { font-weight: 900; font-size: 30px; text-transform: uppercase; letter-spacing: -0.01em; margin: 0 0 16px; }
.note { font-size: 15px; color: var(--muted); margin: 12px 0 0; }

/* table */
.table-box { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 6px; }
.order { width: 100%; border-collapse: collapse; min-width: 620px; font-family: var(--head); }
.order th { text-align: left; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; padding: 14px 18px; border-bottom: 3px solid var(--green); }
.order td { padding: 12px 18px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.order .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 3px; background: var(--c, var(--green)); color: var(--gold); font-weight: 900; }
.order .tt { font-weight: 700; }
.order .tt a { color: var(--ink); text-decoration: none; }
.order .tt a:hover { text-decoration: underline; }
.order .th-sub { display: block; font-weight: 500; font-size: 11px; text-transform: none; letter-spacing: 0; }
.order td.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; white-space: nowrap; }
.order .orig { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }
.order .soon { color: var(--muted); font-weight: 500; }
.btn { display: inline-block; background: var(--green); color: var(--paper); border-radius: 4px; padding: 10px 16px; font-family: var(--head); font-weight: 700; text-decoration: none; }
.btn:hover { background: var(--green-d); color: var(--paper); }

/* cards and prose */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 40px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-left: 10px solid var(--c, var(--green)); border-radius: 4px; padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0; }
.card .meta { font-family: var(--head); font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.prose { max-width: 720px; }
.prose h2 { font-weight: 900; font-size: 26px; text-transform: uppercase; margin: 40px 0 12px; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose ul, .prose ol { padding-left: 22px; }

/* summaries (uitklapbaar) */
.sec-head h2 { margin: 0 0 16px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.ghost-btn { font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--green); background: var(--white); border: 1px solid var(--line-3); border-radius: 4px; padding: 10px 14px; cursor: pointer; min-height: 44px; }
.ghost-btn:hover { border-color: var(--green); }
.sum { background: var(--card); border: 1px solid var(--line); border-left: 10px solid var(--c, var(--green)); border-radius: 4px; margin: 0 0 12px; scroll-margin-top: 16px; }
.sum > summary { list-style: none; display: flex; align-items: center; gap: 16px; padding: 14px 20px; cursor: pointer; }
.sum > summary::-webkit-details-marker { display: none; }
.sum .sum-head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sum .h3 { font-family: var(--head); font-weight: 700; font-size: 20px; line-height: 1.25; }
.sum .meta { font-family: var(--head); font-size: 14px; color: var(--muted); }
.sum .chev { flex: 0 0 auto; width: 12px; height: 12px; border-right: 3px solid var(--green); border-bottom: 3px solid var(--green); transform: rotate(45deg); margin: 0 6px 6px 0; transition: transform .15s ease; }
.sum[open] .chev { transform: rotate(225deg); margin: 6px 6px 0 0; }
.sum-body { padding: 4px 26px 22px; border-top: 1px solid var(--line); }
.sum-body p { margin: 14px 0 0; max-width: 75ch; }
.sum-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.sum-foot .top { font-family: var(--head); font-size: 14px; font-weight: 700; }

/* covers, kopen, klikbare cards */
.cover-s { width: 44px; height: auto; border-radius: 2px; box-shadow: 0 1px 3px rgba(43,38,32,.25); flex: 0 0 auto; }
.cover-m { width: 64px; height: auto; border-radius: 2px; box-shadow: 0 1px 4px rgba(43,38,32,.3); flex: 0 0 auto; align-self: flex-start; }
.tt-in { display: flex; align-items: center; gap: 14px; }
.order .price { font-weight: 700; white-space: nowrap; }
.btn-s { padding: 8px 14px; font-size: 15px; white-space: nowrap; }
.mob-buy { display: none; }
.order .tt a.link-buy { font-weight: 700; color: var(--green); text-decoration: underline; }
.card.link-card { display: flex; gap: 16px; color: var(--ink); text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.card.link-card:hover, .card.link-card:focus-visible { border-color: var(--green); transform: translateY(-2px); color: var(--ink); }
.card.link-card .go { display: inline-block; margin-top: 10px; font-family: var(--head); font-weight: 700; font-size: 15px; color: var(--green); }
.card.link-card:hover .go { text-decoration: underline; }

/* faq */
.faq details { padding: 12px 0; border-top: 1px solid var(--line-3); }
.faq details:last-child { border-bottom: 1px solid var(--line-3); }
.faq summary { font-family: var(--head); font-weight: 700; cursor: pointer; font-size: 17px; }
.faq details p { margin: 8px 0 0; }

/* lists */
.az-letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 24px; padding: 0; list-style: none; font-family: var(--head); font-weight: 700; }
.az-letters a, .az-letters span { display: grid; place-items: center; min-width: 40px; min-height: 40px; border: 1px solid var(--line-3); border-radius: 4px; background: var(--white); text-decoration: none; }
.az-letters span { color: var(--line-3); }
.az-group { margin: 0 0 28px; scroll-margin-top: 16px; }
.az-group h2 { font-size: 26px; margin: 0 0 8px; color: var(--green); }
.az-group ul { list-style: none; margin: 0; padding: 0; columns: 2 280px; column-gap: 40px; }
.az-group li { padding: 6px 0; border-bottom: 1px solid var(--line-2); break-inside: avoid; }
.az-group li a { font-family: var(--head); font-weight: 700; }
.az-group li small { color: var(--muted); font-family: var(--head); }

/* home */
.home-search { display: flex; flex-wrap: wrap; gap: 10px; max-width: 640px; margin: 0 0 36px; }
.home-search label { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; background: var(--white); border: 1px solid var(--line-3); border-radius: 6px; padding: 12px 16px; }
.home-search input { border: 0; background: transparent; font: inherit; font-size: 17px; width: 100%; outline: none; color: var(--ink); }
.home-search .btn { border: 0; cursor: pointer; font-size: 16px; padding: 14px 22px; }
.steps { counter-reset: s; }
.steps .card h3::before { counter-increment: s; content: counter(s) " · "; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; }

/* footer */
.site-foot { background: var(--ink); color: #E8E1D3; font-family: var(--head); font-size: 15px; }
.site-foot .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px 40px; padding-top: 48px; padding-bottom: 40px; }
.site-foot h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); margin: 0 0 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 0 0 6px; }
.site-foot a { color: #F6F1E7; }
.site-foot a:hover { color: var(--gold); }
.site-foot p { margin: 0 0 8px; font-family: var(--body); }
.site-foot .legal { border-top: 1px solid #4A4237; padding-top: 16px; padding-bottom: 24px; font-size: 13px; color: #BDB3A2; }
.site-foot .legal p { font-family: var(--head); max-width: 860px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .head-search { flex: 1 1 100%; }
  .head-search input { width: 100%; }
  .spine { flex-basis: 78px; padding: 10px 8px; }
  .spine .n { font-size: 22px; }
  .spine .t { font-size: 12px; }
  .sec > h2, .sec-head h2, .h2 { font-size: 24px; }
  .sum > summary { padding: 12px 14px; gap: 12px; }
  .sum-body { padding: 4px 16px 18px; }
  .sum .h3 { font-size: 17px; }
  .cover-m { width: 52px; }
  .mob-buy { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; font-weight: 700; font-size: 14px; }
  .order { min-width: 0; }
  .order th, .order td { padding: 10px 10px; }
  .order .opt { display: none; }
}
@media (prefers-reduced-motion: reduce) { .spine, .sum .chev, .card.link-card { transition: none; } html { scroll-behavior: auto; } }

/* Zwevende knop "Op deze pagina" (zoals tuinkeuzehulp.nl): popup met de H2's van de pagina. */
.page-nav { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none; }
.page-nav[hidden] { display: none; }
.page-nav-toggle { pointer-events: auto; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--green); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px rgba(31, 77, 58, .35); transition: transform .15s ease, background .15s ease; }
.page-nav-toggle:hover { background: #2A6550; transform: translateY(-1px); }
.page-nav .ic-close { display: none; }
.page-nav.is-open .ic-open { display: none; }
.page-nav.is-open .ic-close { display: block; }
.page-nav-panel { order: -1; background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(43, 38, 32, .18); padding: 10px; min-width: 240px; max-width: min(320px, calc(100vw - 40px)); max-height: min(60vh, 420px); overflow-y: auto; opacity: 0; transform: translateY(8px) scale(.98); pointer-events: none; transition: opacity .15s ease, transform .15s ease; font-family: var(--head); }
.page-nav.is-open .page-nav-panel { opacity: 1; transform: none; pointer-events: auto; }
.page-nav-title { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 800; color: var(--green); padding: 6px 10px 8px; }
.page-nav-panel a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.35; }
.page-nav-panel a:hover, .page-nav-panel a:focus-visible, .page-nav-panel a.is-active { background: var(--card); }
.page-nav-panel a.is-active { color: var(--green); font-weight: 700; }
@media (max-width: 600px) { .page-nav { right: 14px; bottom: 14px; } }
