/* ==========================================================================
   The Project Mentor's Fieldbook – het magazine van Gaps Uitgeverij
   Een nummer = vier pagina's: cover, twee binnenpagina's en een achterkaft.
   Groot scherm met JavaScript: bladeren als een echt magazine (spread).
   Gsm of zonder JavaScript: de pagina's naast elkaar, vegen om te bladeren.
   Woordmerk (.mw) en mini-cover staan in uitgeverij.css.
   ========================================================================== */

.thema-uitgeverij {
  --oker: #B07A1A;
  --oker-licht: #F1E2C2;
  --mag-lijn: #2A211B;
  --blad: #FBF7EE;
}

/* ---------- Kop boven het magazine ---------- */
.mag-kop { padding-top: clamp(20px, 3vw, 36px); }
.mag-kop__balk { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--grijs); padding-bottom: 10px; border-bottom: 1px solid var(--mag-lijn); }
.mag-kop__balk a { text-decoration: none; color: var(--bruin); }
.mag-kop__balk a::before { content: "← "; }
.mag-kop__naam { margin: 0; padding: 14px 0 10px; color: var(--bruin); }
.mag-kop__naam .mw__hoofd { font-size: clamp(52px, 9vw, 120px); }
.mag-kop__naam .mw__boven { font-size: clamp(13px, 1.5vw, 19px); }
.mag-kop__onder { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 6px 24px; padding: 10px 0; border-top: 4px solid var(--mag-lijn); border-bottom: 1px solid var(--mag-lijn); font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--bruin-2); }
.mag-kop--overzicht { padding-bottom: 32px; }

/* ---------- Het magazine: basis (gsm, en zonder JavaScript) ---------- */
.fb { padding-top: clamp(20px, 3vw, 36px); padding-bottom: 12px; }
.fb__boek {
  position: relative; display: flex; gap: 16px; align-items: flex-start;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 6px 4px 22px; scrollbar-width: thin;
}
.fb-p {
  --pw: min(calc(100vw - 2 * var(--rand) - 8px), 520px);
  flex: 0 0 var(--pw); width: var(--pw);
  container-type: inline-size;
  position: relative; scroll-snap-align: center;
  display: flex; flex-direction: column;
  padding: 1.6em 1.5em 2.4em;
  background: var(--blad); color: var(--bruin);
  font-size: 15px; line-height: 1.5;
  box-shadow: 0 1px 2px rgba(42, 33, 27, .12), 0 12px 32px -12px rgba(42, 33, 27, .35);
  overflow: hidden;
}
.fb-p a { color: inherit; }

/* Folio (kopregel) en paginanummer */
.fb-folio { display: flex; justify-content: space-between; gap: 1em; margin: 0 0 1.1em; padding-bottom: .5em; border-bottom: 1px solid var(--mag-lijn); font-size: .68em; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--grijs); }
.fb-paginanr { position: absolute; bottom: 1em; left: 0; right: 0; margin: 0; text-align: center; font-size: .72em; font-weight: 600; color: var(--grijs); }
.fb-label { margin: 0 0 .6em; font-size: .7em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--oker); }

/* ---------- Pagina 1: cover ---------- */
.fb-p--cover { padding: 0; background: var(--bruin); color: #FBF7EE; aspect-ratio: 210 / 297; justify-content: space-between; }
.fb-cover__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fb-p--cover::before, .fb-p--cover::after { content: ""; position: absolute; left: 0; right: 0; pointer-events: none; }
.fb-p--cover::before { top: 0; height: 34%; background: linear-gradient(rgba(22, 17, 13, .38), rgba(22, 17, 13, 0)); }
.fb-p--cover::after { bottom: 0; height: 52%; background: linear-gradient(rgba(22, 17, 13, 0), rgba(22, 17, 13, .55) 30%, rgba(22, 17, 13, .9)); }
.fb-cover__kop, .fb-cover__onder { position: relative; z-index: 1; padding: 5.5cqi 6cqi; }
.fb-cover__kop { padding-bottom: 0; text-shadow: 0 1px 12px rgba(0, 0, 0, .25); }
.mw--cover { margin: 0; color: #FBF7EE; }
.mw--cover .mw__boven { font-size: 3.9cqi; }
.mw--cover .mw__hoofd { font-size: 14.2cqi; }
.fb-cover__balk { display: flex; justify-content: space-between; gap: 1em; margin: 1.6cqi 0 0; padding: 1.4cqi 0; border-top: 2px solid currentColor; border-bottom: 1px solid currentColor; font-size: 2.6cqi; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.fb-cover__onder { padding-top: 0; }
.fb-cover__thema { margin: 0 0 2.6cqi; font-family: var(--serif); font-weight: 500; font-size: 10.5cqi; line-height: 1; letter-spacing: -0.01em; color: #FBF7EE; }
.fb-p--cover .fb-cover__thema em { color: #F3CF8A; }
.fb-cover__regels { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.6cqi; }
.fb-cover__regels li { padding-top: 1.6cqi; border-top: 1px solid rgba(251, 247, 238, .45); font-family: var(--serif); font-style: italic; font-size: 3.7cqi; line-height: 1.25; }

/* ---------- Pagina 2: inhoud en woord vooraf ---------- */
.fb-inhoud { margin-bottom: 1.3em; padding-top: .7em; border-top: 3px solid var(--mag-lijn); }
.fb-inhoud ol { list-style: none; margin: 0; padding: 0; }
.fb-inhoud li + li { border-top: 1px solid var(--papier-lijn); }
.fb-inhoud a { display: flex; justify-content: space-between; gap: 1em; padding: .32em 0; text-decoration: none; font-family: var(--serif); font-size: .9em; line-height: 1.3; }
.fb-inhoud a:hover span { color: var(--bordeaux); }
.fb-inhoud em { font-style: normal; font-family: var(--display); font-weight: 700; color: var(--oker); }
.fb-voorwoord__kop { margin: 0 0 .7em; font-family: var(--serif); font-weight: 500; font-style: italic; font-size: 1.55em; line-height: 1.15; letter-spacing: -0.01em; color: var(--bordeaux); }
.fb-voorwoord__kop em { font-style: normal; }
.fb-voorwoord__tekst { font-family: var(--serif); font-size: .88em; line-height: 1.5; }
.fb-voorwoord__tekst p { margin: 0 0 .7em; }
.fb-voorwoord__tekst > p:first-child::first-letter { float: left; font-family: var(--serif); font-size: 3.3em; line-height: .82; padding: .06em .1em 0 0; color: var(--oker); }
.mag-handtekening { font-style: italic; color: var(--bruin-2); }

/* ---------- Pagina 3: artikels, gereedschap ---------- */
.fb-artikel { display: grid; grid-template-columns: 2.1em 1fr; gap: .2em .7em; padding: 0 0 .9em; margin-bottom: .9em; border-bottom: 1px solid var(--papier-lijn); }
.fb-artikel__nr { font-family: var(--display); font-weight: 700; font-size: 1.9em; line-height: .9; letter-spacing: -0.04em; color: var(--oker); font-variant-numeric: tabular-nums; }
.mag-artikel__meta { display: flex; gap: .8em; align-items: center; margin: 0 0 .3em; font-size: .72em; color: var(--grijs); }
.taalchip { display: inline-block; padding: .05em .55em; border: 1px solid var(--bruin); border-radius: 4px; font-size: .95em; font-weight: 700; letter-spacing: .08em; color: var(--bruin); }
.fb-artikel__titel { margin: 0 0 .3em; font-family: var(--serif); font-weight: 500; font-size: 1.22em; line-height: 1.15; letter-spacing: -0.01em; }
.fb-artikel__titel a { text-decoration: none; }
.fb-artikel__titel a:hover { color: var(--bordeaux); }
.fb-artikel__intro { margin: 0 0 .4em; font-size: .82em; color: var(--bruin-2); }
.fb-artikel__link { font-size: .78em; font-weight: 600; color: var(--bordeaux) !important; text-underline-offset: 3px; }
.fb-gereedschap { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; margin-bottom: 1em; }
.fb-gereedschap .fb-label { grid-column: 1 / -1; margin-bottom: 0; }
.fb-tool { display: flex; flex-direction: column; gap: .25em; padding: .7em .8em; background: var(--oker-licht); border-left: 4px solid var(--oker); text-decoration: none; }
.fb-tool__titel { font-family: var(--serif); font-weight: 500; font-size: .95em; line-height: 1.2; }
.fb-tool__tekst { font-size: .72em; line-height: 1.4; color: var(--bruin-2); }
.fb-tool:hover .fb-tool__titel { color: var(--bordeaux); }

/* ---------- Advertenties ---------- */
.advertentie { position: relative; display: flex; flex-direction: column; gap: .5em; padding: 1.7em 1.4em 1.4em; background: var(--ad-vlak); color: var(--ad-tekst); border-radius: 3px; }
.advertentie__vermelding { position: absolute; top: .7em; right: .9em; font-size: .6em; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.advertentie__label { font-size: .68em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ad-accent); }
.advertentie__titel { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.5em; line-height: 1.06; letter-spacing: -0.02em; }
.advertentie__titel em { font-style: normal; }
.advertentie__tekst { margin: 0; font-size: .85em; opacity: .92; }
.advertentie__knop { align-self: flex-start; margin-top: .3em; padding: .65em 1.1em; border-radius: 5px; background: var(--ad-knop); color: var(--ad-knoptekst) !important; font-size: .85em; font-weight: 600; text-decoration: none; }
.advertentie__knop:hover { filter: brightness(1.08); }
.advertentie--petrol { --ad-vlak: #16595F; --ad-tekst: #fff; --ad-accent: #9ED8D2; --ad-knop: #F5901E; --ad-knoptekst: #26231F; }
.advertentie--kobalt { --ad-vlak: #2F5BD3; --ad-tekst: #fff; --ad-accent: #C9D6FA; --ad-knop: #fff; --ad-knoptekst: #1E3E9A; }
.advertentie--bordeaux { --ad-vlak: #8C2A1E; --ad-tekst: #F6F0E4; --ad-accent: #F1C9A6; --ad-knop: #F6F0E4; --ad-knoptekst: #6E1F15; }
.advertentie--oranje { --ad-vlak: #F29400; --ad-tekst: #2B2724; --ad-accent: #2B2724; --ad-knop: #2B2724; --ad-knoptekst: #fff; }
.advertentie--klein { margin-top: auto; padding: 1.3em 1.2em 1.1em; }
.advertentie--klein .advertentie__titel { font-size: 1.2em; }
.advertentie--klein .advertentie__tekst { font-size: .78em; }
.advertentie--klein .advertentie__knop { font-size: .78em; }

/* ---------- Pagina 4: achterkaft ---------- */
.fb-p--achter { padding: 1.5em 1.5em 1.2em; gap: .9em; }
.advertentie__beeld { display: none; }
.advertentie--vol .advertentie__beeld { display: block; position: relative; flex: 1; min-height: 0; margin: -2.2em -1.8em .3em; overflow: hidden; border-radius: 3px 3px 0 0; }
.advertentie--vol .advertentie__beeld img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; }
.advertentie--vol { flex: 1; min-height: 0; justify-content: flex-end; gap: .9em; padding: 2.2em 1.8em 2em; background-image: radial-gradient(120% 70% at 85% 0%, rgba(255, 255, 255, .14), transparent 60%); }
.advertentie--vol .advertentie__label { font-size: .78em; }
.advertentie--vol .advertentie__titel { font-size: 2.5em; line-height: 1; }
.advertentie--vol .advertentie__tekst { font-size: 1em; max-width: 30em; }
.advertentie--vol .advertentie__knop { font-size: .95em; padding: .8em 1.3em; }
.advertentie--strook { padding: 1.1em 1.2em 1em; }
.advertentie--strook .advertentie__titel { font-size: 1.15em; }
.advertentie--strook .advertentie__tekst { font-size: .76em; }
.advertentie--strook .advertentie__knop { font-size: .76em; }
.fb-colofon { font-size: .68em; line-height: 1.45; color: var(--grijs); }
.fb-colofon p { margin: 0 0 .3em; }
.fb-colofon strong { color: var(--bruin); }
.fb-colofon a { font-weight: 600; color: var(--bordeaux); }

/* ---------- Bediening ---------- */
.fb-bediening { display: flex; justify-content: center; align-items: center; gap: 18px; padding-top: 6px; }
.fb-bediening[hidden], .fb-hint[hidden] { display: none; }
.fb-knop { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--mag-lijn); background: transparent; color: var(--bruin); font-size: 20px; cursor: pointer; }
.fb-knop:hover:not(:disabled) { background: var(--bruin); color: var(--papier); }
.fb-knop:disabled { opacity: .3; cursor: default; }
.fb-stand { min-width: 9em; margin: 0; text-align: center; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bruin-2); }
.fb-hint { margin-top: 6px; margin-bottom: clamp(32px, 5vw, 56px); text-align: center; font-size: 13px; color: var(--grijs); }

/* ---------- Bladeren als een magazine (groot scherm, met JavaScript) ---------- */
.fb--flip { --pw: min(calc((min(100vw, var(--houder) + 2 * var(--rand)) - 2 * var(--rand)) / 2), max(460px, calc((100svh - 120px) * .7071)), 600px); --ph: calc(var(--pw) * 1.4142); padding-top: 28px; }
.fb--flip .fb__boek { display: block; overflow: visible; scroll-snap-type: none; position: relative; width: calc(2 * var(--pw)); height: var(--ph); margin: 0 auto; padding: 0; perspective: 2800px; transition: transform .7s cubic-bezier(.3, .1, .2, 1); }
.fb--flip[data-stand="0"] .fb__boek { transform: translateX(-25%); }
.fb--flip[data-stand="2"] .fb__boek { transform: translateX(25%); }
.fb-blad { position: absolute; top: 0; left: 50%; width: var(--pw); height: var(--ph); transform-style: preserve-3d; transform-origin: left center; transition: transform .9s cubic-bezier(.3, .1, .2, 1); cursor: pointer; }
.fb-blad.is-om { transform: rotateY(-180deg); }
.fb-blad__zijde { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fb-blad__zijde--achter { transform: rotateY(180deg); }
.fb--flip .fb-p { --pw: inherit; width: 100%; height: 100%; flex: none; aspect-ratio: auto; font-size: calc(var(--pw) * .0265); scroll-snap-align: none; box-shadow: 0 2px 4px rgba(42, 33, 27, .12), 0 24px 48px -18px rgba(42, 33, 27, .45); }
/* Rug van het magazine: schaduw aan de binnenkant van elke pagina */
.fb--flip .fb-blad__zijde--voor .fb-p:not(.fb-p--cover)::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 9%; background: linear-gradient(90deg, rgba(42, 33, 27, .16), rgba(42, 33, 27, 0)); pointer-events: none; }
.fb--flip .fb-blad__zijde--achter .fb-p::before { content: ""; position: absolute; inset: 0 0 0 auto; width: 9%; background: linear-gradient(270deg, rgba(42, 33, 27, .16), rgba(42, 33, 27, 0)); pointer-events: none; z-index: 2; }
.fb--flip .fb-p a, .fb--flip .fb-p button { cursor: pointer; }
@media (prefers-reduced-motion: reduce) {
  .fb--flip .fb__boek, .fb-blad { transition: none; }
}

/* ---------- Overzicht van de nummers ---------- */
.mag-nummers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 32px; margin-top: 32px; }
.mag-nummer { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--bruin); }
.mag-nummer__tekst { color: var(--bruin-2); font-size: 15px; }
.mag-nummer__link { font-weight: 600; color: var(--bordeaux); }
.mag-nummer:hover .mini-cover { transform: translateY(-4px); }
.advertentie--vol .advertentie__vermelding { z-index: 1; top: .9em; right: .9em; padding: .35em .7em; border-radius: 3px; background: rgba(22, 17, 13, .6); opacity: 1; }
.fb { scroll-margin-top: 80px; }
/* Gsm en zonder JavaScript: pagina's met natuurlijke hoogte */
.fb:not(.fb--flip) .advertentie--vol .advertentie__beeld { flex: none; aspect-ratio: 4 / 3; }
.fb:not(.fb--flip) .advertentie--vol .advertentie__titel { font-size: 2em; }
@media (max-width: 520px) { .fb:not(.fb--flip) .fb-gereedschap { grid-template-columns: 1fr; } }

/* Cover met een lichte foto bovenaan: woordmerk in inktkleur */
.kop-donker::before { background: linear-gradient(rgba(251, 247, 238, .72), rgba(251, 247, 238, .35) 60%, rgba(251, 247, 238, 0)) !important; }
.kop-donker .fb-cover__kop, .kop-donker .mini-cover__kop { color: #2A211B; text-shadow: 0 1px 10px rgba(251, 247, 238, .6); }
.kop-donker .mw--cover { color: #2A211B; }
