/* ==========================================================================
   Toon Janssen Schrijft — site stylesheet
   Rebuilt to match the designer's mockup (11-03-2024 Website-cor.pdf).
   Self-contained: no Bootstrap / Webflow / jQuery required.
   ========================================================================== */

/* ----- Brand fonts (kept from the original assets) ------------------------ */
@font-face {
  font-family: "TitleFont";
  src: url("../asset/Tienne-Bold.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "PageFont";
  src: url("../asset/ArabotoBold400.ttf") format("truetype");
  font-display: swap;
}

/* ----- Design tokens ------------------------------------------------------ */
:root {
  --black: #231f20;
  --red: #d1232a;
  --panel: #d4d4d4;          /* grey spec panel */
  --panel-ink: #231f20;
  --ink: #2b2b2b;            /* body text */
  --muted: #5b5b5b;
  --page: #ffffff;
  --maxw: 920px;
  --gap: 28px;
  --radius: 2px;
  --header-h: 96px;
  --photo-w: 200px;
  --photo-left: 64px;                                       /* x where the floating photo starts (right of the left hamburger) */
  --intro-indent: calc(var(--photo-left) + var(--photo-w) + 16px); /* where text begins, just right of the photo */
  --font-body: "PageFont", "Roboto", "Segoe UI", system-ui, sans-serif;
  --font-title: "TitleFont", Georgia, "Times New Roman", serif;
}

/* ----- Minimal reset ------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: #000; }

h1, h2, h3, p { margin: 0; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

/* The page is centred in a fixed-width column, like the mockup. */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px 80px;
}

/* ==========================================================================
   Masthead — black bar + author photo + serif title
   ========================================================================== */
.masthead { position: relative; margin-top: 18px; }

.masthead__bar {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--header-h);
  background: var(--black);
  color: #fff;
  /* left hamburger sits at the bar edge; the photo floats just after it */
  padding-left: 14px;
  padding-right: 14px;
}

.masthead__title {
  flex: 1 1 auto;
  text-align: center;
  /* clear the left hamburger (14px pad + 42px glyph) + the floating photo */
  padding-left: calc(var(--intro-indent) - 56px);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Hamburger glyphs flanking the title (open the in-page menu) */
.masthead__menu {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  color: #fff;
}
.masthead__menu span {
  display: block;
  height: 3px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
}
/* Both hamburgers are flex children flanking the title, on the black bar
   (never on top of the author photo). */

/* Photo floats just right of the left hamburger, overlapping the bar and
   extending below it. */
.masthead__photo {
  position: absolute;
  top: calc(var(--header-h) / 2);   /* photo starts halfway down the black bar */
  left: var(--photo-left);
  width: var(--photo-w);
  height: 270px;
  object-fit: cover;
  z-index: 2;
}
/* Intro clears the photo on the left and the bar above it. */
.masthead__intro {
  padding-left: var(--intro-indent);
  padding-top: 22px;
  min-height: calc(270px - var(--header-h) / 2);
}
.masthead__intro p { margin-bottom: 1em; }
.masthead__intro strong { font-weight: 700; }

/* ==========================================================================
   In-page menu (revealed by the hamburger)
   ========================================================================== */
.nav {
  position: absolute;
  top: var(--header-h);
  right: 14px;
  z-index: 20;
  background: var(--black);
  color: #fff;
  min-width: 220px;
  padding: 8px 0;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  display: none;
}
.nav[data-open="true"] { display: block; }
.nav a {
  display: block;
  padding: 11px 22px;
  color: #fff;
  font-size: 15px;
}
.nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* ==========================================================================
   Books — three aligned rows (intro / covers / order cards), two columns each
   ========================================================================== */
/* Two independent book columns sit side by side. Each column flows on its own
   (align-items: start, no shared rows), so expanding one book's blurb only
   pushes that book's cover/order down — never the other's. */
.books {
  margin-top: 46px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--gap);
  align-items: start;
}
.book-col {
  display: flex;
  flex-direction: column;
}
.book-col > * + * { margin-top: 26px; }

.book__kicker {
  display: inline;
  color: var(--red);
  font-size: 30px;
  font-weight: 700;
}
.book__title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 12px;
  color: var(--black);
}
.book__kicker + .book__title { display: inline; margin-left: 8px; }

.book__blurb { font-size: 15px; line-height: 1.5; color: var(--ink); }
.more-link {
  color: var(--red);
  font-weight: 700;
  white-space: nowrap;
}
.more-link:hover { color: var(--red); text-decoration: underline; }

/* Blurbs render truncated; the rest is revealed when "lees meer" is clicked
   (each book expands independently). */
.book__rest { display: none; }
.book__ellipsis { color: inherit; }
.book.is-expanded .book__rest { display: inline; }
.book.is-expanded .book__ellipsis { display: none; }

/* Covers row */
.book__cover { text-align: center; }
.book__cover-btn {
  display: inline-block;
  cursor: zoom-in;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.book__cover-btn:hover { transform: translateY(-4px); filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.22)); }
.book__cover-btn img { max-height: 500px; width: auto; margin: 0 auto; }
.book__caption {
  margin-top: 12px;
  font-style: italic;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

/* Order cards */
.order-card {
  display: flex;
  flex-direction: column;
  align-self: stretch;        /* both cards match the tallest in the row */
  text-align: left;
  background: var(--panel);
  color: var(--panel-ink);
}
.order-card__head {
  display: block;
  background: var(--black);
  color: #fff;
  padding: 12px 18px;
  font-size: 14px;
  line-height: 1.35;
}
.order-card__head strong { display: block; font-size: 15px; }
.order-card__head .mail { display: block; color: #e7e7e7; }
.order-card:hover .order-card__head { background: #000; }

.order-card__body {
  flex: 1 1 auto;             /* grey panel grows so both cards align */
  padding: 14px 18px 18px;
}
.order-card__name { display: block; font-weight: 700; font-size: 18px; margin-bottom: 6px; color: var(--black); }
.order-card__spec { display: block; font-size: 14px; line-height: 1.55; }

.section-rule { border: 0; border-top: 1px solid #e2e2e2; margin: 48px 0; }

/* ==========================================================================
   Order form
   ========================================================================== */
.order { margin-top: 10px; }

.order__head {
  background: var(--black);
  color: #fff;
  padding: 14px 20px;
  margin-bottom: 22px;
}
.order__head h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}
.order__head p { font-size: 14px; color: #e0e0e0; margin-top: 4px; }

.order-form { max-width: 720px; margin: 0 auto; padding-top: 30px; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px 18px;
}
.field { display: flex; flex-direction: column; }
/* Push every control to the bottom of its cell so inputs in a row line up
   even when a label wraps to two lines. */
.field .form-control { margin-top: auto; }
.col-12 { grid-column: span 12; }
.col-8 { grid-column: span 8; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  height: 44px;
  padding: 8px 12px;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bdbdbd;
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
select.form-control { background: #f3f3f3; cursor: pointer; }
.form-control:focus {
  outline: 0;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(209, 35, 42, 0.15);
}
.form-control:disabled { background: #ececec; color: #6a6a6a; cursor: not-allowed; }

.field-error { color: var(--red); font-size: 13px; margin-top: 5px; list-style: none; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn-order {
  display: inline-block;
  margin: 26px auto 0;
  padding: 14px 46px;
  background: var(--red);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border-radius: var(--radius);
  transition: background 0.15s ease, transform 0.05s ease;
}
.btn-order:hover { background: #b41d24; color: #fff; }
.btn-order:active { transform: translateY(1px); }
.order-form__submit { text-align: center; }

/* ==========================================================================
   Order confirmation (replaces the old success page)
   ========================================================================== */
.confirmation {
  margin: 40px auto 0;
  max-width: 640px;
  text-align: center;
  background: var(--panel);
  border-top: 6px solid var(--red);
  padding: 34px 28px;
}
.confirmation h2 { font-size: 26px; color: var(--black); margin-bottom: 12px; }
.confirmation p { font-size: 16px; color: var(--ink); }

/* ==========================================================================
   Full-screen book reader (iOS-Books style)
   ========================================================================== */
.reader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  flex-direction: column;
  background: #1b1b1d;
  color: #fff;
  /* avoid notches / browser chrome on mobile */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.reader.is-open { display: flex; }
body.reader-open { overflow: hidden; }

.reader__bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}
.reader__title {
  flex: 1 1 auto;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reader__count {
  flex: 0 0 auto;
  font-size: 14px;
  color: #cfcfcf;
  font-variant-numeric: tabular-nums;
}
.reader__btn {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.15s ease;
}
.reader__btn:hover { background: rgba(255, 255, 255, 0.25); }
.reader__download { font-size: 20px; text-decoration: none; }

.reader__stage {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.reader__page {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  background: #fff;
  transition: transform 0.28s ease, opacity 0.28s ease;
  will-change: transform, opacity;
}
.reader__page.slide-left { transform: translateX(-40px); opacity: 0; }
.reader__page.slide-right { transform: translateX(40px); opacity: 0; }

/* Tap zones / arrows for navigation */
.reader__nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 28%;
  display: flex;
  align-items: center;
  border: 0;
  color: #fff;
  background: transparent;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.reader__stage:hover .reader__nav { opacity: 0.8; }
.reader__nav:disabled { opacity: 0 !important; cursor: default; }
.reader__nav--prev { left: 0; justify-content: flex-start; padding-left: 14px; }
.reader__nav--next { right: 0; justify-content: flex-end; padding-right: 14px; }
.reader__nav span {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  font-size: 24px;
}

.reader__spinner {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: reader-spin 0.8s linear infinite;
  display: none;
}
.reader.is-loading .reader__spinner { display: block; }
@keyframes reader-spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 720px) {
  :root { --header-h: 72px; }

  .masthead__bar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .masthead__title { font-size: 9vw; padding-left: 0; }

  /* Photo drops into normal flow below the bar, centred. */
  .masthead__photo {
    position: static;
    margin: 18px auto 0;
    width: 190px;
    height: 220px;
  }
  .masthead__intro {
    padding-left: 0;
    padding-top: 18px;
    min-height: 0;
  }

  /* Stack the two book columns. */
  .books {
    grid-template-columns: 1fr;
    row-gap: 30px;
  }

  .form-grid .field { grid-column: 1 / -1; }

  .reader__nav { opacity: 0.85; width: 32%; }
}

@media screen and (min-width: 721px) {
  /* On desktop, render the books as two self-contained columns so each
     book's intro+cover+order block stack beneath one another and stay
     aligned row-by-row across the two columns. */
}
