/* Foxy in beeld, Adventures: laadt enkel op de avonturenpagina's (naast galerij.css). */

/* ---------- Foxy's boekenkast: de reels als boeken op een plank ---------- */
.boekenkast { padding: 90px 0 100px; background: radial-gradient(ellipse 80% 60% at 50% 25%, #2b2140, #120f1c 75%); }
.boekenkast .section-header { margin-bottom: 2.4rem; }
.kast {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 36px;
    max-width: 960px;
    margin: 0 auto;
}
.schilderij--boek { width: auto; padding-top: 0; margin: 0; }
.schilderij--boek .schilderij__lijst {
    width: 78%;
    margin: 0 auto;
    padding: 10px 12px 12px 24px;
    border: 0;
    border-image: none;
    border-radius: 5px 14px 14px 5px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0 14px, rgba(255, 255, 255, 0.2) 14px 16px, rgba(0, 0, 0, 0.12) 16px 18px, transparent 18px),
        var(--bk, #3b5ba5);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.55), inset -5px 0 0 #f4ecd8, inset -6px 0 0 rgba(0, 0, 0, 0.18), inset -9px 0 0 #e9dec4;
    rotate: var(--r, -1.5deg);
    transform-origin: 50% 100%;
    transition: rotate 0.3s ease, translate 0.3s ease, box-shadow 0.3s ease;
}
.schilderij--boek:nth-child(2) { margin-top: 0; }
.schilderij--boek:nth-child(2) .schilderij__lijst { --r: 1.2deg; }
.schilderij--boek:nth-child(3) .schilderij__lijst { --r: -0.6deg; }
.schilderij--boek:hover .schilderij__lijst, .schilderij--boek.is-film .schilderij__lijst { rotate: 0deg; translate: 0 -8px; }
.schilderij--boek .schilderij__lijst::before { /* leeslint */
    content: '';
    position: absolute;
    z-index: 3;
    top: -6px;
    right: 22%;
    width: 12px;
    height: 46px;
    background: var(--lint, #e5484d);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.schilderij--boek .schilderij__doek { border-radius: 4px; }
.schilderij--boek .schilderij__doek::before { display: none; } /* geen doekstructuur: dit is een boekomslag */
.kast__plank { /* plankje onder elk boek; samen één lange plank */
    position: relative;
    align-self: stretch;
    z-index: 0;
    height: 22px;
    margin: -4px -18px 0;
    background: linear-gradient(#b17a42, #84552a 55%, #5c3a1a);
    box-shadow: 0 14px 22px rgba(0, 0, 0, 0.45), inset 0 3px 0 rgba(255, 255, 255, 0.16);
}
.schilderij--boek:first-child .kast__plank { border-radius: 4px 0 0 4px; }
.schilderij--boek:last-child .kast__plank { border-radius: 0 4px 4px 0; }
.schilderij--boek .bordje { flex: 1 1 auto; width: 92%; margin: 22px auto 0; rotate: 0deg; } /* alle bordjes even hoog */
.kast__veeg { display: none; }
@media (max-width: 760px) {
    .kast {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: 74%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        gap: 0 22px;
        margin: 0 -16px;
        padding: 18px 16px 10px;
    }
    .kast::-webkit-scrollbar { display: none; }
    /* sterker dan de gsm-regels van de schilderijen (die hangen naast hun bordje, de tweede gespiegeld) */
    .kast .schilderij.schilderij--boek, .kast .schilderij.schilderij--boek:nth-child(2), .held-boek .schilderij.schilderij--boek { flex-direction: column; align-items: stretch; gap: 0; padding-top: 0; scroll-snap-align: center; }
    .kast .schilderij--boek .schilderij__lijst { flex: none; width: 80%; margin: 0 auto; }
    .held-boek .schilderij--boek .schilderij__lijst { flex: none; width: 80%; margin: 0 auto; }
    .held-boek .schilderij--boek .bordje { flex: none; width: 100%; margin: 18px auto 0; }
    .held-boek .schilderij--boek .schilderij__label { display: none; }
    .kast .schilderij--boek .bordje { flex: 1 1 auto; width: 96%; margin: 18px auto 0; }
    .kast .schilderij--boek .schilderij__label { display: none; }
    .kast__plank { margin: -4px -11px 0; }
    .kast__veeg { display: block; margin: 8px 0 0; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
}

/* ---------- Schatkist "Weten is de sleutel": drie sloten, één per held ---------- */
.kist {
    --sk: #2e9d5b;
    position: relative;
    display: grid;
    gap: 14px;
    padding: 18px 20px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    background: radial-gradient(ellipse 80% 55% at 50% 18%, rgba(255, 209, 102, 0.12), transparent 70%), rgba(13, 13, 26, 0.55);
}
.kist__beeld { position: relative; width: min(100%, 300px); margin: 22px auto 0; }
.kist__svg { display: block; width: 100%; height: auto; overflow: visible; }
.kist__deksel { transform-box: view-box; transform-origin: 22px 78px; transition: transform 0.7s cubic-bezier(.3, 1.4, .5, 1); }
.kist__gloed { opacity: 0; transition: opacity 0.6s ease 0.2s; }
.kist[data-staat="open"] .kist__deksel { transform: translate(-2px, -6px) rotate(-21deg); }
.kist[data-staat="open"] .kist__gloed { opacity: 1; }
.kist__slot { transition: opacity 0.4s ease; }
.kist__slot rect { fill: var(--c); }
.kist__beugel { transform-box: fill-box; transform-origin: 100% 100%; transition: transform 0.45s cubic-bezier(.3, 1.6, .5, 1); }
.kist__slot.is-open .kist__beugel { transform: translateY(-6px) rotate(-32deg); }
.kist__slot.is-nu rect { stroke: #ffd166; stroke-width: 3.5; }
.kist__helden { /* Pip, Noor en Foxy springen uit de open kist */
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 54%;
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    pointer-events: none;
}
.kist__helden img { width: 22%; height: auto; opacity: 0; translate: 0 40%; transition: opacity 0.4s ease, translate 0.6s cubic-bezier(.3, 1.6, .5, 1); }
.kist__helden img:nth-child(2) { width: 20%; transition-delay: 0.12s; }
.kist__helden img:nth-child(3) { width: 26%; transition-delay: 0.24s; }
.kist[data-staat="open"] .kist__helden img { opacity: 1; translate: 0 0; }
.kist__stapel { display: grid; }
.kist__stapel > * { grid-area: 1 / 1; min-width: 0; }
.kist[data-staat="open"] .kist__paneel, .kist:not([data-staat="open"]) .kist__open { visibility: hidden; pointer-events: none; }
.kist__paneel, .kist__open { position: relative; display: flex; flex-direction: column; gap: 10px; }
.kist__wie { display: flex; align-items: center; gap: 10px; }
.kist__wie img { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4)); }
.kist__naam { font-weight: 800; }
.kist__leeftijd { padding: 1px 8px; border-radius: 99px; background: var(--sk); color: #fff; font-size: 0.78rem; font-weight: 800; }
.kist__tekstvak { position: relative; padding: 12px 14px; border-radius: 14px; background: #fff8ea; color: #2b1d12; }
.kist__hint { position: absolute; left: 14px; right: 14px; bottom: 12px; margin: 0; color: #8a7a68; font-size: 0.85rem; font-weight: 600; }
.kist__tekstvak.is-feit .kist__hint { visibility: hidden; }
.kist__tekst { margin: 0; font-weight: 600; line-height: 1.5; }
.kist__opties { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; }
.kist__optie {
    min-height: 46px;
    padding: 8px 18px;
    border: 2px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text-primary);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) { .kist__optie:not([aria-disabled="true"]):hover { border-color: var(--sk); } }
.kist__optie:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.kist__optie[aria-disabled="true"] { cursor: default; }
.kist__optie.is-fout { opacity: 0.45; text-decoration: line-through; }
.kist__open { align-items: flex-start; }
.kist__open h3 { margin: 0; font-size: 1.15rem; }
.kist__open p { margin: 0; color: var(--text-secondary); }
.kist__knoppen { display: flex; flex-wrap: wrap; gap: 10px; }
.storybook .stat-row { margin-top: 22px; }
html:not(.js) .kist { display: none; }
/* ---------- Heldenpagina's: het boek in "Wie is ...?" ---------- */
.held-boek { display: grid; justify-items: center; }
.held-boek .schilderij--boek { width: min(100%, 260px); }
.held-boek .schilderij--boek .schilderij__lijst { width: 86%; }
.held-boek .kast__plank { margin: -4px -6px 0; border-radius: 4px; }
.held-boek .schilderij--boek .bordje { width: 100%; }
.held-boek + .speech-row { margin-top: 18px; }
.storybook__text .stat-row { margin-top: 22px; }
.probeer { padding: 80px 0; }
.probeer .section-header { margin-bottom: 2rem; }

/* ---------- Pip: weetjeskaartjes om om te draaien ---------- */
.kaartjes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 18px; max-width: 900px; margin: 0 auto; }
.kaartje {
    position: relative;
    min-height: 230px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: center;
    cursor: pointer;
    perspective: 900px;
    -webkit-tap-highlight-color: transparent;
}
.kaartje__binnen { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 0.6s cubic-bezier(.3, 1.2, .5, 1); }
.kaartje.is-om .kaartje__binnen { transform: rotateY(180deg); }
.kaartje__voor, .kaartje__achter {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    border-radius: 18px;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}
.kaartje__voor { background: radial-gradient(circle at 50% 35%, #2f4f86, #1b2a4f 75%); border: 3px solid #fffaf0; }
.kaartje__voor::after { content: ''; position: absolute; inset: 7px; border-radius: 13px; border: 1.5px dashed rgba(255, 255, 255, 0.25); }
.kaartje__voor img { width: 46%; height: auto; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); }
.kaartje__voor b { color: #fff; font-size: 1rem; }
.kaartje__achter { background: #fffaf0; color: #2b1d12; transform: rotateY(180deg); border: 3px solid #f5a524; }
.kaartje__achter b { font-size: 0.95rem; }
.kaartje__achter span { font-size: 0.88rem; font-weight: 500; line-height: 1.45; }
.kaartje:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; border-radius: 18px; }
.kaartjes__teller { margin: 18px 0 0; text-align: center; color: var(--text-secondary); font-weight: 600; min-height: 3.2em; }
@media (max-width: 760px) { .kaartjes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .kaartje { min-height: 250px; } .kaartje__achter { padding: 12px; } .kaartje__achter span { font-size: 0.8rem; } }

/* ---------- Noor: graaf mee door de lagen ---------- */
.graven { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(18px, 4vw, 40px); align-items: center; max-width: 960px; margin: 0 auto; }
.graven__grond { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4); }
.graven__gras { position: relative; height: 92px; background: linear-gradient(#8fd3ff, #c9ecff 70%, #6fbf4a 70%, #4f9a31); }
.graven__gras img { position: absolute; left: 50%; bottom: 8px; width: 56px; height: auto; translate: -50% 0; }
.graven__laag {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 86px;
    padding: 10px 16px;
    border: 0;
    border-top: 2px solid rgba(0, 0, 0, 0.25);
    background: var(--lk);
    color: #fff;
    font: inherit;
    text-align: left;
    cursor: default;
}
.graven__laag::before { /* de aarde die er nog op ligt */
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.22) 0 3px, transparent 4px) 0 0 / 34px 26px,
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.08) 0 2px, transparent 3px) 0 0 / 22px 18px,
        #5d4128;
    transition: opacity 0.5s ease;
}
.graven__laag.is-open::before { opacity: 0; }
.graven__laag > * { position: relative; }
.graven__tijd { font-weight: 800; font-size: 0.95rem; opacity: 0; transition: opacity 0.4s ease 0.2s; }
.graven__tijd small { display: block; font-weight: 600; font-size: 0.78rem; opacity: 0.85; }
.graven__vondst { width: 54px; height: 54px; opacity: 0; scale: 0.4; transition: opacity 0.4s ease 0.3s, scale 0.5s cubic-bezier(.3, 1.6, .5, 1) 0.3s; }
.graven__laag.is-open .graven__tijd, .graven__laag.is-open .graven__vondst { opacity: 1; scale: 1; }
.graven__schep { position: relative; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.92); color: #3b2410; font-size: 0.82rem; font-weight: 800; visibility: hidden; }
.graven__laag.is-nu { cursor: pointer; box-shadow: inset 0 0 0 3px #ffd166; }
.graven__laag.is-nu .graven__schep { visibility: visible; }
.graven__laag.is-open .graven__schep { visibility: hidden; }
.graven__laag:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.graven__paneel { display: flex; flex-direction: column; gap: 12px; }
.graven__wie { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.graven__wie img { width: 46px; height: 46px; object-fit: contain; }
.graven__tekstvak { padding: 14px 16px; border-radius: 16px; background: #fff8ea; color: #2b1d12; }
.graven__tekstvak b { display: block; margin-bottom: 4px; }
.graven__tekstvak p { margin: 0; line-height: 1.5; }
.graven__teller { margin: 0; min-height: 3.2em; color: var(--text-secondary); font-weight: 600; }
@media (max-width: 760px) { .graven { grid-template-columns: minmax(0, 1fr); } .graven__laag { min-height: 74px; } }

/* ---------- Foxy: fabeltje of feit? ---------- */
.fabels { max-width: 900px; margin: 0 auto; }
.fabels__kop { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--text-secondary); font-weight: 700; font-size: 0.92rem; }
.fabels__kop b { color: var(--text-primary); }
.fabels__boek {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    border-radius: 10px 10px 14px 14px;
    background: linear-gradient(90deg, #f6eedb 0 39.4%, #d9cfb7 39.6% 40.4%, #f6eedb 40.6%); /* vouw tussen de bladzijden (kolommen 0.8 / 1.2) */
    color: #2b1d12;
    box-shadow: 0 0 0 8px #7a3e1d, 0 0 0 10px #4f2410, 0 18px 34px rgba(0, 0, 0, 0.5);
}
.fabels__links { display: grid; place-items: center; padding: 22px; }
.fabels__links img { width: min(70%, 180px); height: auto; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.25)); }
.fabels__rechts { display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 22px 28px; }
.fabels__mythe { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.45; }
.fabels__mythe span { display: block; margin-bottom: 2px; color: #e2531f; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.fabels__mythe q { quotes: none; }
.fabels__mythe.is-fabel q { text-decoration: line-through; text-decoration-color: #e5484d; text-decoration-thickness: 3px; }
.fabels__knoppen { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 52px; }
.fabels__knoppen .btn { min-height: 46px; padding-top: 10px; padding-bottom: 10px; }
.fabels__knop {
    min-height: 46px;
    padding: 8px 20px;
    border: 2px solid #c9b994;
    border-radius: 12px;
    background: #fffaf0;
    color: #2b1d12;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
@media (hover: hover) { .fabels__knop:hover { border-color: #e2531f; } }
.fabels__knop:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.fabels__ency { padding: 12px 14px; border-left: 4px solid #3b6fd8; border-radius: 6px; background: rgba(59, 111, 216, 0.08); }
.fabels__ency b { display: block; margin-bottom: 4px; color: #23324a; }
.fabels__ency p { margin: 0; font-size: 0.92rem; line-height: 1.5; }
.fabels__ency.is-wacht { border-left-color: #c9b994; background: rgba(201, 185, 148, 0.16); }
.fabels__ency.is-wacht b, .fabels__ency.is-wacht p { color: #7a6a52; }
.fabels__host { display: flex; align-items: flex-end; gap: 10px; margin-top: 18px; }
.fabels__host img { width: 76px; height: auto; flex: 0 0 auto; }
.fabels__host .fx-bubble { flex: 1 1 auto; margin-bottom: 10px; }
@media (max-width: 700px) {
    .fabels__boek { grid-template-columns: minmax(0, 1fr); background: #f6eedb; }
    .fabels__links { padding: 16px 16px 0; }
    .fabels__links img { width: 34%; }
    .fabels__rechts { padding: 14px 16px 18px; }
    .fabels__knoppen { min-height: 104px; align-content: flex-start; }
}
html:not(.js) .kaartjes__teller, html:not(.js) .graven, html:not(.js) .fabels { display: none; }

@media (prefers-reduced-motion: no-preference) {
    .kist__slot.is-schud { animation: flash-schud 0.45s ease; }
    .kist__optie.is-fout { animation: flash-schud 0.45s ease; }
    .graven__laag.is-nu .graven__schep { animation: fx-glow 2s ease-in-out infinite; }
    .fabels__boek.is-blad { animation: blad-om 0.45s ease; }
    .fabels__host img.is-pop, .fabels__host .fx-bubble.is-pop, .graven__wie img.is-pop { animation: fx-pop 0.35s cubic-bezier(.2, .75, .2, 1.2); }
    .kist[data-staat="open"] .kist__gloed { animation: kist-gloed 2.4s ease-in-out infinite 0.8s; }
}
@keyframes blad-om { 0% { opacity: 0.4; translate: 12px 0; } 100% { opacity: 1; translate: 0 0; } }
@keyframes kist-gloed { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@media (prefers-reduced-motion: reduce) {
    .kist__deksel, .kist__beugel, .kist__helden img, .kaartje__binnen, .graven__laag::before, .graven__tijd, .graven__vondst { transition: none; }
}
