/* ============ Mijn Heldenboek — huisstijl van het boek zelf ============
   Avondlucht (voorleestijd) + crème/inkt/koraal uit de PDF + handgeschreven
   accenten (Patrick Hand, het opdracht-font uit het boek). */

:root {
  --night: #1c2148;
  --night-deep: #12152f;
  --cream: #FFF8EE;
  --paper: #FFFDF7;
  --ink: #3A2E2A;
  --accent: #E07A5F;
  --accent-dark: #C75F45;
  --gold: #F2C166;
  --muted: #8d7c6e;
  --lijn: #e7dccb;
  --schaduw: 0 14px 40px rgba(36, 28, 22, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}
h1, h2, h3 { font-family: "Fredoka", sans-serif; line-height: 1.15; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin: 0 0 .4rem; text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 2.2rem; max-width: 36rem; }
img { display: block; max-width: 100%; }

/* ============ Hero: avondlucht ============ */
.sky {
  position: relative;
  background: linear-gradient(180deg, var(--night-deep) 0%, var(--night) 55%, #2d2f63 100%);
  color: var(--cream);
  overflow: hidden;
  padding-bottom: 4.5rem;
}

/* sterrenvelden: twee lagen, één fonkelt */
.stars, .stars-2 {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.6px 1.6px at 22px 34px, rgba(255,248,238,.95), transparent 60%),
    radial-gradient(1.2px 1.2px at 121px 88px, rgba(255,248,238,.7), transparent 60%),
    radial-gradient(2px 2px at 203px 21px, rgba(242,193,102,.9), transparent 60%),
    radial-gradient(1.2px 1.2px at 68px 142px, rgba(255,248,238,.6), transparent 60%),
    radial-gradient(1.6px 1.6px at 167px 168px, rgba(255,248,238,.85), transparent 60%);
  background-size: 230px 190px;
}
.stars-2 {
  background-image:
    radial-gradient(1.4px 1.4px at 45px 60px, rgba(255,248,238,.8), transparent 60%),
    radial-gradient(2.2px 2.2px at 150px 30px, rgba(242,193,102,.85), transparent 60%),
    radial-gradient(1.2px 1.2px at 90px 130px, rgba(255,248,238,.65), transparent 60%);
  background-size: 280px 240px;
  animation: fonkel 3.4s ease-in-out infinite alternate;
}
@keyframes fonkel { from { opacity: .35; } to { opacity: 1; } }

.moon {
  position: absolute; top: 7rem; right: 8%;
  width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #FFFBEF 0%, #FBE3AE 45%, #F2C166 100%);
  box-shadow: 0 0 70px 22px rgba(242, 193, 102, .28), inset -10px -8px 24px rgba(199, 95, 69, .18);
}

/* golvende overgang naar crème */
.sky-rand { position: absolute; bottom: -1px; left: 0; width: 100%; height: 70px; }
.sky-rand path { fill: var(--cream); }

.nav {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 72rem; margin: 0 auto; padding: 1.3rem 1.5rem;
}
.brand { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.25rem; display: inline-flex; align-items: center; gap: .4rem; }
.brand-star { width: 18px; fill: var(--gold); animation: fonkel 2.6s ease-in-out infinite alternate; }
.nav-cta {
  color: var(--cream); text-decoration: none; font-weight: 700; font-size: .95rem;
  border: 2px solid rgba(255, 248, 238, .45); border-radius: 999px; padding: .45rem 1.1rem;
  transition: border-color .2s, background .2s;
}
.nav-cta:hover { border-color: var(--gold); background: rgba(242, 193, 102, .12); }

.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 3rem; align-items: center;
  max-width: 72rem; margin: 0 auto; padding: 3.5rem 1.5rem 1rem;
}
.eyebrow {
  font-family: "Patrick Hand", cursive; font-size: 1.25rem; color: var(--gold);
  margin: 0 0 .6rem; transform: rotate(-1.2deg); transform-origin: left;
}
.hero-copy h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 1.1rem; font-weight: 600; }
.marker { position: relative; white-space: nowrap; }
.marker::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: .06em; height: .38em;
  background: var(--accent); opacity: .55; border-radius: 3px; transform: rotate(-1deg);
  z-index: -1;
}
.lead { font-size: 1.15rem; color: rgba(255, 248, 238, .88); max-width: 33rem; margin: 0 0 1.8rem; }
.reassure { font-family: "Patrick Hand", cursive; font-size: 1.05rem; color: rgba(255, 248, 238, .65); margin-top: 1rem; }

/* knoppen */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font-family: "Nunito", sans-serif; font-weight: 800; font-size: 1.05rem;
  border-radius: 999px; padding: .95rem 1.9rem;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; box-shadow: 0 8px 24px rgba(224, 122, 95, .38);
}
.btn-primary:hover { transform: translateY(-2px) rotate(-.4deg); box-shadow: 0 12px 30px rgba(224, 122, 95, .48); }
.btn-secondary { background: var(--night); color: var(--cream); box-shadow: 0 6px 18px rgba(28, 33, 72, .25); }
.btn-secondary:hover { transform: translateY(-2px); background: var(--night-deep); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* boeken-tafereel rechts */
.book-scene { position: relative; height: 420px; }
.cover {
  position: absolute; margin: 0; width: 200px;
  background: var(--paper); border-radius: 10px; padding: 9px 9px 0;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .45);
  animation: zweef 6s ease-in-out infinite;
}
.cover img { border-radius: 6px; aspect-ratio: 1; object-fit: cover; }
.cover figcaption {
  font-family: "Fredoka", sans-serif; font-weight: 600; color: var(--accent-dark);
  text-align: center; font-size: .95rem; padding: .5rem 0 .65rem;
}
.cover-a { left: 0; top: 40px; transform: rotate(-9deg); animation-delay: 0s; z-index: 1; }
.cover-b { left: 32%; top: 0; transform: rotate(2.5deg); width: 230px; animation-delay: 1.2s; z-index: 3; }
.cover-c { right: 0; top: 90px; transform: rotate(8deg); animation-delay: 2.3s; z-index: 2; }
@keyframes zweef {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}
.sparkle { position: absolute; width: 22px; fill: var(--gold); animation: fonkel 2.2s ease-in-out infinite alternate; }
.sparkle-1 { left: 26%; top: -14px; animation-delay: .4s; }
.sparkle-2 { right: 12%; top: 40px; width: 15px; animation-delay: 1s; }
.sparkle-3 { left: 8%; bottom: 30px; width: 17px; animation-delay: 1.6s; }

/* ============ Stappen ============ */
.steps { max-width: 64rem; margin: 0 auto; padding: 4.5rem 1.5rem 1rem; }
.steps-rij { display: flex; align-items: stretch; justify-content: center; gap: .6rem; margin-top: 2.2rem; }
.stap { flex: 1; max-width: 16rem; text-align: center; padding: 0 .5rem; }
.stap-nr {
  display: inline-grid; place-items: center; width: 52px; height: 52px;
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.45rem; color: #fff;
  background: var(--accent); border-radius: 50% 46% 52% 48% / 48% 52% 46% 52%;
  transform: rotate(-3deg); margin-bottom: .7rem; box-shadow: 0 6px 14px rgba(224, 122, 95, .35);
}
.stap:nth-child(3) .stap-nr { background: var(--night); transform: rotate(2deg); box-shadow: 0 6px 14px rgba(28,33,72,.3); }
.stap:nth-child(5) .stap-nr { background: var(--gold); color: var(--ink); transform: rotate(-2deg); box-shadow: 0 6px 14px rgba(242,193,102,.4); }
.stap h3 { margin: 0 0 .3rem; font-size: 1.15rem; }
.stap p { margin: 0; color: var(--muted); font-size: .98rem; }
.stap-pijl { width: 70px; flex: none; align-self: center; margin-top: -1.5rem; }
.stap-pijl path { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 7; opacity: .7; }

/* ============ Polaroid-galerij ============ */
.gallery { max-width: 70rem; margin: 0 auto; padding: 4rem 1.5rem 2rem; }
.polaroids { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; }
.polaroid {
  margin: 0; background: var(--paper); padding: 12px 12px 4px;
  border-radius: 4px; box-shadow: var(--schaduw); width: 230px;
  transition: transform .25s ease;
}
.polaroid img { aspect-ratio: 1; object-fit: cover; border-radius: 2px; }
.polaroid figcaption { font-family: "Patrick Hand", cursive; font-size: 1.15rem; text-align: center; padding: .55rem 0 .7rem; color: var(--ink); }
.p-1 { transform: rotate(-3.5deg); }
.p-2 { transform: rotate(2deg) translateY(14px); }
.p-3 { transform: rotate(-1.5deg); }
.p-4 { transform: rotate(3.5deg) translateY(10px); }
.polaroid:hover { transform: rotate(0deg) translateY(-6px) scale(1.04); z-index: 2; }

/* ============ Formulier: vel briefpapier ============ */
.maker { padding: 3.5rem 1.5rem 2rem; }
.papier {
  max-width: 46rem; margin: 0 auto; background: var(--paper);
  border-radius: 14px; padding: 2.6rem clamp(1.2rem, 5vw, 3rem) 2.8rem;
  box-shadow: var(--schaduw); position: relative;
}
.papier::before {
  content: ""; position: absolute; inset: 10px;
  border: 2px dashed var(--lijn); border-radius: 9px; pointer-events: none;
}
.papier > * { position: relative; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; margin-top: 1.8rem; }
.form label {
  display: flex; flex-direction: column; gap: .3rem;
  font-family: "Patrick Hand", cursive; font-size: 1.13rem; color: var(--ink);
}
.opt { color: var(--muted); font-size: .95rem; }
.form-section {
  grid-column: 1 / -1; margin: .9rem 0 -.2rem;
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.1rem; color: var(--accent-dark);
}
.form input, .form select {
  font-family: "Nunito", sans-serif; font-size: 1rem; color: var(--ink);
  background: var(--cream); border: 2px solid var(--lijn); border-radius: 10px;
  padding: .65rem .8rem; transition: border-color .2s, box-shadow .2s;
}
.form input:focus, .form select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(224, 122, 95, .15);
}
.checkbox-row { flex-direction: row !important; align-items: center; gap: .55rem !important; }
.checkbox-row input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }
.form label.veld-breed,
.form label:has(input[name="childName"]),
.form label:has(input[name="theme"]),
.form label:has(input[name="traits"]),
.form label:has(input[name="email"]) { grid-column: 1 / -1; }
#preview-btn { grid-column: 1 / -1; justify-self: center; margin-top: 1rem; }

/* preview: opengeslagen boekpagina */
.preview { margin-top: 2.4rem; }
.preview-card {
  background: var(--cream); border-radius: 12px; padding: 2.2rem clamp(1.2rem, 4vw, 2.6rem);
  box-shadow: inset 0 0 0 1px var(--lijn), 0 10px 28px rgba(36, 28, 22, .1);
  position: relative;
}
.preview-label {
  position: absolute; top: -14px; left: 50%; translate: -50% 0;
  font-family: "Patrick Hand", cursive; font-size: 1.05rem; color: #fff;
  background: var(--accent); border-radius: 999px; padding: .15rem 1rem; transform: rotate(-1.5deg);
}
.preview-card h3 { color: var(--accent-dark); font-size: 1.55rem; margin: .3rem 0 .4rem; text-align: center; }
.dedication { font-family: "Patrick Hand", cursive; font-size: 1.15rem; color: var(--muted); text-align: center; margin: 0 0 1.2rem; }
#preview-body { font-size: 1.12rem; line-height: 1.75; max-width: 34rem; margin: 0 auto; }
.unlock { text-align: center; border-top: 2px dashed var(--lijn); margin-top: 1.8rem; padding-top: 1.6rem; }
.unlock-text { max-width: 28rem; margin: 0 auto 1.2rem; color: var(--muted); }
.guarantee { font-family: "Patrick Hand", cursive; color: var(--muted); font-size: 1rem; margin-top: .8rem; }

.error {
  max-width: 46rem; margin: 1rem auto 0; text-align: center;
  background: #FBE6E0; color: #A3402B; border-radius: 10px; padding: .8rem 1.2rem; font-weight: 700;
}
.hidden { display: none; }

/* ============ Vertrouwen ============ */
.trust { text-align: center; padding: 2.5rem 1.5rem .5rem; }
.trust p { color: var(--muted); font-weight: 700; font-size: .98rem; margin: 0; }
.trust span { margin: 0 .55rem; color: var(--lijn); }
.trust svg { width: 16px; vertical-align: -2px; fill: none; stroke: var(--accent); stroke-width: 2; margin-right: .3rem; }

/* ============ FAQ ============ */
.faq { max-width: 44rem; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.faq details {
  background: var(--paper); border-radius: 12px; padding: 1rem 1.3rem;
  margin-bottom: .8rem; box-shadow: 0 4px 14px rgba(36, 28, 22, .07);
}
.faq summary { font-weight: 800; cursor: pointer; font-size: 1.05rem; }
.faq summary::marker { color: var(--accent); }
.faq p { color: var(--muted); margin: .6rem 0 .2rem; }

/* ============ Footer ============ */
.footer {
  background: var(--night-deep); color: rgba(255, 248, 238, .65);
  text-align: center; padding: 2rem 1.5rem; font-size: .95rem;
}
.footer a { color: inherit; }

/* ============ Subpagina's (juridisch, bedankt, toespraak) ============ */
.sky-klein { padding-bottom: 3rem; }
.sky-klein .brand { color: var(--cream); text-decoration: none; }
.sky-klein .hero-mini { position: relative; z-index: 2; max-width: 44rem; margin: 0 auto; padding: 1.5rem 1.5rem 2.5rem; }

.legal { max-width: 44rem; margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.legal h1 { font-size: 2.1rem; margin: 0 0 .3rem; }
.legal-sub { color: var(--muted); font-family: "Patrick Hand", cursive; font-size: 1.1rem; margin: 0 0 2rem; }
.legal h2 { text-align: left; font-size: 1.25rem; margin: 2.2rem 0 .5rem; color: var(--accent-dark); }
.legal a { color: var(--accent-dark); }
.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: .45rem; }

.kleine-lettertjes { color: var(--muted); font-size: .85rem; margin-top: .5rem; }
.kleine-lettertjes a { color: inherit; }

/* ============ Mobiel ============ */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2.2rem; }
  .book-scene { height: 300px; max-width: 26rem; margin: 0 auto; width: 100%; }
  .cover { width: 150px; }
  .cover-b { width: 170px; left: 30%; }
  .moon { top: 5rem; right: 5%; width: 60px; height: 60px; }
  .moon::after { width: 46px; height: 46px; left: 11px; top: 7px; }
  .steps-rij { flex-direction: column; align-items: center; gap: 1.6rem; }
  .stap-pijl { transform: rotate(75deg); margin: -.4rem 0; width: 54px; }
  .form { grid-template-columns: 1fr; }
  .form label { grid-column: 1 / -1 !important; }
}
