/* ============================================================
   SHARED STYLES — Speelkameraadjes
   Used across all pages: variables, base, header, footer, buttons,
   reveal animations, common section layouts.
   ============================================================ */

:root {
  /* Brand hues — exact logo colours */
  --brand-green: #006420;
  --brand-green-500: #1e8a3a;
  --brand-green-200: #cdebd4;
  --brand-green-50:  #ecf8ef;

  --brand-yellow: #fcdc00;
  --brand-yellow-300: #ffe862;
  --brand-yellow-100: #fff5b4;
  --brand-yellow-50:  #fffbe0;

  --brand-orange: #fc6024;
  --brand-orange-300: #ff9166;
  --brand-orange-100: #ffd9c7;
  --brand-orange-50:  #fff0e8;

  --brand-plum: #944c94;
  --brand-plum-300: #c490c4;
  --brand-plum-100: #ecd5ec;
  --brand-plum-50:  #f7ebf7;

  --brand-sky: #5fb8d6;
  --brand-sky-100: #cfeaf3;
  --brand-coral: #ff8a8a;
  --brand-coral-100: #ffd9d9;

  --ink: #1a2b1f;
  --ink-soft: #4a5a4f;
  --paper: #fff9ee;
  --paper-2: #fff3d6;

  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 30px;
  --radius-xl: 40px;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Nunito', system-ui, sans-serif;

  --shadow-sticker: 6px 6px 0 0 rgba(26,43,31,0.16);
  --shadow-sticker-lg: 10px 10px 0 0 rgba(26,43,31,0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* overflow-x: clip on the document container prevents decorative absolute-positioned
   elements (hero blobs at right: -80px, etc.) from expanding the layout width on
   mobile. On phones that triggers a "smart layout viewport" auto-zoom-out, which is
   why interior pages were rendering at ~513px CSS width on a 375px device. Using
   `clip` (not `hidden`) keeps overflow-y: visible, so blobs can still bleed
   vertically past .home-hero / .page-hero into the header/footer regions. */
html { overflow-x: clip; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-weight: 500;
  line-height: 1.5;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.05;
  margin: 0;
}

/* ============================================================
   HEADER (sticky pill nav)
   ============================================================ */
.nav-shell {
  position: sticky;
  top: 14px;
  z-index: 100;
  padding: 0 16px;
  margin-bottom: 0;
}
.nav {
  max-width: 1240px;
  margin: 0 auto;
  background: white;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 6px 0 0 var(--ink), 0 14px 30px -10px rgba(26,43,31,0.25);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.nav-brand .logo-mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand-yellow);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.nav-brand .logo-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}
.nav-links {
  display: none;
  gap: 4px;
  align-items: center;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink);
  transition: background .2s ease, color .2s ease;
  position: relative;
}
.nav-link:hover { background: var(--brand-yellow-100); }

/* Active link gets its own brand color per page — playful identity. */
.nav-link.active {
  background: var(--brand-green);
  color: white;
}
.nav-link.active[href="/over-ons"]      { background: var(--brand-plum);      color: white; }
.nav-link.active[href="/activiteiten"]  { background: var(--brand-orange);    color: white; }
.nav-link.active[href="/galerij"]       { background: var(--brand-yellow);    color: var(--ink); }
.nav-link.active[href="/verhalen"]      { background: var(--brand-coral);     color: white; }
.nav-link.active[href="/boek-en-steun"] { background: var(--brand-green-500); color: white; }
.nav-link.active[href="/contact"]       { background: var(--brand-sky);       color: var(--ink); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--brand-orange);
  color: white;
  font-weight: 800;
  font-size: 0.92rem;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.nav-cta:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 0 var(--ink); }
.nav-cta:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 0 var(--ink); }

@media (min-width: 900px) {
  .nav-links { display: flex; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  border: 2.5px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--brand-plum);
  color: white;
  box-shadow: 5px 5px 0 0 var(--ink);
}
.btn-primary:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 0 var(--ink); }
.btn-primary:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 0 var(--ink); }

.btn-secondary {
  background: white;
  color: var(--ink);
  box-shadow: 5px 5px 0 0 var(--brand-green);
}
.btn-secondary:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 0 var(--brand-green); }
.btn-secondary:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 0 var(--brand-green); }

.btn-yellow {
  background: var(--brand-yellow);
  color: var(--ink);
  box-shadow: 5px 5px 0 0 var(--ink);
}
.btn-yellow:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 0 var(--ink); }
.btn-yellow:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 0 var(--ink); }

.btn-orange {
  background: var(--brand-orange);
  color: white;
  box-shadow: 5px 5px 0 0 var(--ink);
}
.btn-orange:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 0 var(--ink); }

.btn-green {
  background: var(--brand-green);
  color: white;
  box-shadow: 5px 5px 0 0 var(--ink);
}
.btn-green:hover { transform: translate(-2px,-2px); box-shadow: 7px 7px 0 0 var(--ink); }

/* ============================================================
   PAGE HERO (small) — for non-home pages
   ============================================================ */
.page-hero {
  position: relative;
  padding: 70px 16px 60px;
  text-align: center;
  /* No overflow:hidden — the blob trio (yellow / plum / orange) is positioned
     with negative offsets on purpose, so the soft gradients bleed past the
     section edges and merge with the cream paper page background. Clipping
     them produces a visible horizontal cut line at the section boundary. */
}
.page-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  background: var(--brand-yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 0 var(--brand-green);
  transform: rotate(-2deg);
  margin-bottom: 22px;
}
.page-hero .eyebrow .dot {
  width: 10px; height: 10px;
  background: var(--brand-orange);
  border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  margin-bottom: 18px;
  font-weight: 700;
}
.page-hero h1 em {
  color: var(--brand-orange);
  font-style: italic;
  display: inline-block;
  transform: rotate(-2deg);
}
.page-hero h1 .underline {
  position: relative;
  color: var(--ink);
  display: inline-block;
}
.page-hero h1 .underline::after {
  content: '';
  position: absolute;
  left: -4px; right: -4px; bottom: 6%;
  height: 32%;
  background: var(--brand-yellow);
  border-radius: 8px;
  z-index: -1;
  transform: rotate(-1deg);
}
.page-hero .lead {
  font-size: 1.2rem;
  color: var(--ink-soft);
  line-height: 1.55;
  max-width: 620px;
  margin: 0 auto;
}
.page-hero-blobs {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
}
.page-hero-blobs .blob {
  position: absolute;
  filter: blur(50px);
  border-radius: 50%;
}
.page-hero-blobs .blob.b1 {
  top: -50px; left: -50px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, var(--brand-yellow-300), transparent 70%);
  opacity: 0.7;
}
.page-hero-blobs .blob.b2 {
  top: 20px; right: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, var(--brand-plum-100), transparent 70%);
  opacity: 0.8;
}
.page-hero-blobs .blob.b3 {
  bottom: -100px; left: 30%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--brand-orange-100), transparent 70%);
  opacity: 0.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  padding: 80px 16px 30px;
  background: var(--ink);
  color: white;
  margin-top: 80px;
}
.foot-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .foot-inner { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}
.foot-brand { display: flex; flex-direction: column; gap: 16px; }
.foot-brand .logo-row {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}
.foot-brand .logo-row img {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--brand-yellow);
  border: 2px solid white;
  padding: 4px;
}
.foot-brand p { opacity: 0.7; line-height: 1.6; max-width: 360px; }
.foot-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
  margin-bottom: 18px;
  font-weight: 800;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot-col a { opacity: 0.85; transition: opacity .15s; }
.foot-col a:hover { opacity: 1; color: var(--brand-yellow); }
.foot-bottom {
  max-width: 1240px;
  margin: 60px auto 0;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  font-size: 0.84rem;
  opacity: 0.6;
}

/* ============================================================
   COMMON SECTION HEAD
   ============================================================ */
.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 60px;
}
.section-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--brand-orange-100);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 14px;
}
.section-head h2 em {
  color: var(--brand-orange);
  font-style: italic;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-60px); }
[data-reveal="right"] { transform: translateX(60px); }
[data-reveal="pop"]   { transform: scale(0.7) rotate(-4deg); }
[data-reveal="tilt"]  { transform: translateY(50px) rotate(-5deg) scale(0.95); }
[data-reveal="bounce"] { transform: translateY(60px) scale(0.9); }
[data-reveal="zoom"]  { transform: scale(0.5); }
[data-reveal="flip"]  { transform: perspective(800px) rotateX(35deg) translateY(40px); transform-origin: center bottom; }
[data-reveal="swing"] { transform: rotate(-12deg) translateY(30px); transform-origin: top center; }
[data-reveal].in {
  opacity: 1;
  transform: translate(0,0) scale(1) rotate(0) perspective(800px) rotateX(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    transform: none !important;
    transition: opacity 0.5s ease !important;
  }
  [data-reveal].in { opacity: 1; }
}

/* ============================================================
   WORD-BY-WORD HEADING ANIMATION
   Selected H1/H2s get data-anim="words" via SharedScripts. JS
   wraps each word in <span class="h-word" style="--i: N">; the
   parent gets .is-split (initial hidden state) and then .anim-on
   when scrolled into view. Each word pops with a slight overshoot,
   then the brushstroke under highlight words ("knutselen", "verschil")
   draws in for accent.
   ============================================================ */
[data-anim="words"] .h-word {
  display: inline-block;
}
[data-anim="words"].is-split .h-word {
  opacity: 0;
  transform: translateY(20px) scale(0.94);
  filter: blur(1px);
  will-change: opacity, transform, filter;
}
[data-anim="words"].is-split.anim-on .h-word {
  animation: h-word-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-delay: calc(var(--i, 0) * 65ms);
}
@keyframes h-word-pop {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.94);
    filter: blur(1px);
  }
  60% {
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Yellow brushstroke draw for the highlight word in the home-hero H1. */
[data-anim="words"].is-split .word-yellow::after {
  transform-origin: left center;
  transform: skewX(-6deg) rotate(-1deg) scaleX(0);
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}
[data-anim="words"].is-split.anim-on .word-yellow::after {
  transform: skewX(-6deg) rotate(-1deg) scaleX(1);
  transition-delay: calc(var(--i, 0) * 65ms + 0.4s);
}

/* Wavy underline draw for em accents (e.g. donate "verschil"). */
[data-anim="words"].is-split em::after {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform 0.55s cubic-bezier(0.65, 0, 0.35, 1);
}
[data-anim="words"].is-split.anim-on em::after {
  transform: scaleX(1);
  transition-delay: calc(var(--i, 0) * 65ms + 0.45s);
}

@media (prefers-reduced-motion: reduce) {
  [data-anim="words"].is-split .h-word {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none !important;
  }
  [data-anim="words"].is-split .word-yellow::after,
  [data-anim="words"].is-split em::after {
    transform: skewX(-6deg) rotate(-1deg) scaleX(1);
    transition: none !important;
  }
  [data-anim="words"].is-split em::after {
    transform: scaleX(1);
  }
}

/* ============================================================
   COMMON ANIMATIONS
   ============================================================ */
@keyframes bobble {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-10px) rotate(2deg); }
}
@keyframes float {
  0%,100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%     { transform: translateY(-12px) rotate(calc(var(--r, 0deg) + 6deg)); }
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: 0.85; }
  50%     { transform: scale(1.06); opacity: 1; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}
.section {
  padding: 90px 16px;
}
.bg-paper { background: var(--paper); }
.bg-paper-2 { background: var(--paper-2); }
.bg-cream { background: #fffbf2; }
.bg-green { background: var(--brand-green); color: white; }
.bg-plum { background: var(--brand-plum); color: white; }

/* ============================================================
   FRAMED IMAGE — shared treatment for the three contexts where photos
   ARE allowed (verhalen / galerij / team). Generic uploads acquire the
   site's bespoke "sticker" framing so they don't clash with the
   illustrated rest of the design.
   ============================================================ */
.framed-image {
  position: relative;
  margin: 0;
  display: block;
  overflow: hidden;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sticker);
  transition: transform .25s ease, box-shadow .25s ease;
  /* Tone-coherence filter: nudges varied uploads toward the warm,
     slightly-desaturated paper feel of the rest of the site. */
  filter: contrast(1.04) saturate(0.94);
}
.framed-image:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-sticker-lg);
}
.framed-image-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.framed-image-caption {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.92);
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: 'Caveat', cursive, var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  text-align: center;
}
/* Per-context tweaks (kept minimal so all three feel like one family). */
.framed-team { border-radius: 50%; }
.framed-team .framed-image-img { border-radius: 50%; }
