/* ═══════════════════════════════════════════════════════
   Nomade Educatie — Homepage (redesign 2026)
   Scoped to .nh-home (the <main> of index.php) so the
   design tokens never clash with style.css variables.
   ═══════════════════════════════════════════════════════ */

/* ─── 1. Tokens ─── */
.nh-home {
  --home-ink: #1d1d1f;
  --home-body: #4c4c4e;
  --home-teal: #17909c;
  --home-teal-dark: #0f6d77;
  --home-marker: #cfe8cf;
  --home-dark: #10393d;
  --home-dark-text: #c4d7d5;
  --home-dark-accent: #8fd0c9;
  --home-dark-list: #eef4f2;
  --home-border: #e6e3dc;
  --home-chip: #f1efe9;
  --home-hairline: #ecebe6;
  --home-soft: #f4f2ee;
  --home-shadow-img: 0 14px 30px rgba(29, 29, 31, 0.16);

  color: var(--home-ink);
}


/* ─── 2. Keyframes ─── */
@keyframes nh-landIn {
  from { opacity: 0; transform: translateY(40px) rotate(var(--r, 0deg)); }
  to   { opacity: 1; transform: translateY(0) rotate(var(--r, 0deg)); }
}

@keyframes nh-floaty {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}

@keyframes nh-marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes nh-wordIn {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes nh-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

@keyframes nh-markerSwipe {
  to { background-size: 100% 100%; }
}


/* ─── 3. Shared primitives ─── */

/* Prose links (never matches .nh-btn / .nh-book, which live outside <p>/<li>) */
.nh-home p a,
.nh-home li a {
  color: var(--home-teal);
  text-decoration: none;
}

.nh-home p a:hover,
.nh-home p a:focus-visible,
.nh-home li a:hover,
.nh-home li a:focus-visible {
  color: var(--home-teal-dark);
  text-decoration: underline;
}

/* Marker-swipe highlight — default state is fully highlighted so the page
   still reads correctly without JS and with reduced motion. */
.nh-mark {
  background: linear-gradient(var(--home-marker), var(--home-marker)) left center no-repeat;
  background-size: 100% 100%;
  color: var(--home-ink);
  padding: 2px 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Hero mark: pure CSS, plays 1s after load */
.nh-mark--hero {
  background-size: 0% 100%;
  animation: nh-markerSwipe 0.9s ease 1s both;
}

/* Scroll-triggered marks: only hidden once home.js has armed animations */
html.nh-anim .nh-mark--swipe {
  background-size: 0% 100%;
}

html.nh-anim .nh-mark--swipe.is-swiped {
  animation: nh-markerSwipe 0.9s ease 0.2s both;
}

/* Scroll reveals — same arming principle */
html.nh-anim .nh-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.nh-anim .nh-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Buttons */
.nh-btn {
  display: inline-block;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 13px 30px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nh-btn:hover,
.nh-btn:focus-visible {
  text-decoration: none;
}

.nh-btn--primary {
  background: var(--home-ink);
  border-color: var(--home-ink);
  color: #fff;
}

.nh-btn--primary:hover,
.nh-btn--primary:focus-visible {
  background: #000;
  border-color: #000;
  color: #fff;
}

.nh-btn--secondary {
  background: #fff;
  border-color: var(--home-ink);
  color: var(--home-ink);
}

.nh-btn--secondary:hover,
.nh-btn--secondary:focus-visible {
  background: var(--home-soft);
  color: var(--home-ink);
}

.nh-btn--light {
  background: #fff;
  border-color: #fff;
  color: var(--home-dark);
  padding: 12px 26px;
}

.nh-btn--light:hover,
.nh-btn--light:focus-visible {
  background: #e2eeec;
  border-color: #e2eeec;
  color: var(--home-dark);
}

.nh-btn--outline-dark {
  background: #fff;
  border-color: var(--home-ink);
  color: var(--home-ink);
  padding: 12px 26px;
}

.nh-btn--outline-dark:hover,
.nh-btn--outline-dark:focus-visible {
  background: var(--home-ink);
  color: #fff;
}

.nh-btn--teal {
  background: var(--home-teal);
  border-color: var(--home-teal);
  color: #fff;
  padding: 12px 26px;
  font-size: 14.5px;
}

.nh-btn--teal:hover,
.nh-btn--teal:focus-visible {
  background: var(--home-teal-dark);
  border-color: var(--home-teal-dark);
  color: #fff;
}

.nh-btn--sm { padding: 11px 24px; font-size: 14.5px; }
.nh-btn--lg { padding: 14px 32px; font-size: 15.5px; }

/* Dark pill badge */
.nh-badge {
  display: inline-block;
  background: var(--home-ink);
  color: #fff;
  border-radius: 999px;
  padding: 6px 18px;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0.1em;
}

/* Chips */
.nh-chip {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 11px;
  font-weight: 600;
  font-size: 11.5px;
  line-height: 1.5;
}

.nh-chip--niveau { background: var(--home-marker); color: var(--home-ink); }
.nh-chip--meta   { background: var(--home-chip); color: var(--home-body); font-weight: 400; }
.nh-chip--tto    { border-color: var(--home-teal); color: var(--home-teal); padding: 2px 10px; }
.nh-chip--free   { background: var(--home-marker); color: var(--home-ink); padding: 3px 12px; font-size: 12px; }

/* Section shell */
.nh-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 32px;
}

.nh-section--boeken {
  padding: 88px 32px 48px;
  scroll-margin-top: calc(var(--header-height, 72px) + 24px);
}

.nh-section--leraren { padding: 48px 32px 88px; }
.nh-section--actueel { padding: 0 32px 88px; }

/* Section header: outlined number + heading */
.nh-secthead {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.nh-secthead__num {
  --nh-num: var(--home-teal);
  /* Poppins (digits-only subset) — its geometric numerals outline cleanly with
     text-stroke, where Montserrat's digits look broken as hollow shapes. */
  font-family: Poppins, Montserrat, sans-serif;
  font-weight: 700;
  font-size: clamp(64px, 9vw, 110px);
  line-height: 1;
  color: var(--nh-num); /* fallback where text-stroke is unsupported */
}

@supports (-webkit-text-stroke: 2px currentColor) {
  .nh-secthead__num {
    color: transparent;
    -webkit-text-stroke: 2px var(--nh-num);
  }
}

.nh-secthead__title {
  font-weight: 700;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}


/* ─── 4. Hero ─── */
.nh-hero {
  max-width: 1280px;
  margin: 0 auto;
  /* the site header is fixed — keep the hero clear of it */
  padding: calc(var(--header-height, 72px) + 64px) 32px 48px;
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(300px, 640px) minmax(140px, 1fr);
  gap: 24px;
  align-items: center;
}

.nh-hero__side {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  min-width: 0;
}

.nh-hero__main {
  text-align: center;
  min-width: 0;
}

.nh-hero__item {
  box-shadow: var(--home-shadow-img);
  border-radius: 10px;
}

.nh-hero__cover {
  width: 100%;
  height: auto;
  aspect-ratio: 39 / 50;
  object-fit: cover;
  border-radius: 8px;
}

.nh-hero__shot {
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #fff;
}

.nh-hero__item--1 {
  width: min(150px, 100%);
  --r: -7deg;
  animation: nh-landIn 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.2s both,
             nh-floaty 6s ease-in-out 1.2s infinite;
}

.nh-hero__item--2 {
  width: min(160px, 100%);
  --r: 4deg;
  animation: nh-landIn 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.35s both,
             nh-floaty 7s ease-in-out 1.4s infinite;
}

.nh-hero__item--3 {
  width: min(170px, 100%);
  --r: 6deg;
  animation: nh-landIn 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.5s both,
             nh-floaty 6.5s ease-in-out 1.6s infinite;
}

.nh-hero__item--4 {
  width: min(145px, 100%);
  --r: -4deg;
  animation: nh-landIn 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.65s both,
             nh-floaty 7.5s ease-in-out 1.8s infinite;
}

.nh-hero__title {
  font-weight: 700;
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.14;
  margin: 26px 0 0;
  text-wrap: balance;
}

.nh-hero__sub {
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.3;
  margin: 14px 0 10px;
}

.nh-vak {
  display: inline-block;
  min-width: 9ch; /* reserve room so the rotating word cannot shift the line */
}

.nh-vak__word {
  display: inline-block;
  background: var(--home-marker);
  color: var(--home-ink);
  padding: 2px 12px;
  animation: nh-wordIn 0.45s ease both;
}

.nh-hero__lead {
  font-size: 16px;
  line-height: 1.8;
  color: var(--home-body);
  max-width: 42ch;
  margin: 18px auto 0;
  text-wrap: pretty;
}

.nh-hero__meta {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--home-body);
  max-width: 46ch;
  margin: 14px auto 0;
}

.nh-hero__meta a {
  font-weight: 600;
  display: inline-block;
  margin-top: 4px;
}

.nh-hero__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 28px;
}

.nh-scrollcue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  color: var(--home-teal);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.22em;
}

.nh-scrollcue__bar {
  display: block;
  width: 2px;
  height: 26px;
  border-radius: 2px;
  background: currentColor;
  animation: nh-bounce 1.6s ease-in-out infinite;
}


/* ─── 5. Ticker band ─── */
.nh-ticker {
  background: var(--home-teal);
  transform: rotate(-1.2deg) scale(1.02);
  margin: 24px -8px;
  padding: 14px 0;
  overflow: hidden;
}

.nh-ticker__track {
  display: flex;
  width: max-content;
  /* 88s = the design's 22s-per-phrase speed × 4 phrases per half */
  animation: nh-marquee 88s linear infinite;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.nh-ticker__item {
  padding: 0 18px;
}


/* ─── 6. 01 · De boeken ─── */
.nh-boeken__claim {
  font-weight: 600;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
  margin: 16px 0 0;
}

.nh-boeken__claim .nh-mark {
  padding: 3px 8px;
}

.nh-boeken__claim a {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

.nh-boeken__intro {
  color: var(--home-body);
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 58ch;
  margin: 14px 0 40px;
  text-wrap: pretty;
}

.nh-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 24px;
  align-items: stretch;
  margin-top: 44px; /* room for the overhanging covers */
}

.nh-book {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  border: 1.5px solid var(--home-border);
  border-radius: 20px;
  padding: 24px 22px 22px;
  color: var(--home-ink);
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.nh-book:hover,
.nh-book:focus-visible {
  color: var(--home-ink);
  text-decoration: none;
  transform: translateY(-6px);
  box-shadow: 0 20px 44px rgba(29, 29, 31, 0.14);
  border-color: var(--home-ink);
}

.nh-book__cover {
  width: 72%;
  height: auto;
  aspect-ratio: 39 / 50;
  object-fit: cover;
  margin: -44px auto 0;
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(29, 29, 31, 0.2);
  transform: rotate(var(--r, 0deg));
}

.nh-book--1 { --r: -3deg; }
.nh-book--2 { --r: 2deg; }
.nh-book--3 { --r: -2deg; }
.nh-book--4 { --r: 3deg; }

.nh-book__shelf {
  height: 5px;
  margin: 2px -8px 0;
  border-radius: 99px;
  background: var(--home-chip);
}

.nh-book__name {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  margin: 4px 0 0;
}

.nh-book__text {
  color: var(--home-body);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
  text-wrap: pretty;
}

.nh-book__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}

.nh-book__more {
  color: var(--home-teal);
  font-weight: 600;
  font-size: 14px;
}

.nh-boeken__foot {
  text-align: center;
  color: var(--home-body);
  font-size: 14px;
  margin: 32px 0 0;
}

.nh-boeken__foot a {
  font-weight: 600;
}


/* ─── 7. 02 · De digitale leerlingomgeving ─── */
.nh-darkblock {
  background: var(--home-dark);
  border-radius: 28px;
  padding: clamp(30px, 4.5vw, 64px);
  position: relative;
  overflow: hidden;
}

.nh-darkblock .nh-secthead__num { --nh-num: var(--home-dark-accent); }
.nh-darkblock .nh-secthead__title { color: #fff; }

.nh-darkblock__accent {
  font-weight: 600;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.5;
  color: var(--home-dark-accent);
  margin: 18px 0 10px;
  text-wrap: balance;
}

.nh-darkblock__text {
  color: var(--home-dark-text);
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 68ch;
  margin: 0 0 10px;
  text-wrap: pretty;
}

.nh-darkblock__text--last { margin-bottom: 36px; }

.nh-leerling__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  align-items: center;
}

.nh-leerling__tiles {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nh-tile {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(143, 208, 201, 0.3);
  border-radius: 14px;
  padding: 16px 20px;
  color: var(--home-dark-list);
  font-size: 15px;
  line-height: 1.6;
}

.nh-tile b { color: var(--home-dark-accent); }

.nh-leerling__cta {
  align-self: flex-start;
  margin-top: 8px;
}

.nh-leerling__shot {
  width: 100%;
  /* natural ratio of the delivered crop (1400×780) — no content is cut off */
  aspect-ratio: 1400 / 780;
  height: auto;
  object-fit: cover;
  object-position: center top;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}


/* ─── 8. 03 · De digitale lerarenomgeving ─── */
.nh-leraren__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  align-items: center;
  margin-top: 36px;
}

.nh-leraren__text {
  color: var(--home-body);
  font-size: 16.5px;
  line-height: 1.7;
  margin: 0 0 22px;
  text-wrap: pretty;
}

.nh-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 15px;
  line-height: 1.6;
}

.nh-checklist li {
  display: flex;
  gap: 10px;
}

.nh-checklist__tick {
  color: var(--home-teal);
  font-weight: 700;
}

.nh-leraren__cta { margin-top: 24px; }

.nh-leraren__shot {
  width: 100%;
  /* natural ratio of the delivered crop (1400×768) — keeps names + kolommen intact */
  aspect-ratio: 1400 / 768;
  height: auto;
  object-fit: cover;
  object-position: center top;
  border: 1.5px solid var(--home-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(29, 29, 31, 0.1);
}


/* ─── 9. Nomade Actueel — gedeelde teal-kaart (homepage + /nomade-digitaal) ─── */
.nh-home .nd-actueel {
  background: #fff;
  border: 1.5px solid var(--home-teal);
  border-radius: 20px;
  padding: clamp(24px, 3.5vw, 44px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: clamp(24px, 3.5vw, 40px);
  align-items: center;
}

.nh-home .nd-actueel__body { min-width: 0; }

.nh-home .nd-actueel__head {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.nh-home .nd-actueel__title {
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
  margin: 0;
}

.nh-home .nd-actueel__text {
  color: var(--home-body);
  font-size: 15.5px;
  line-height: 1.7;
  margin: 14px 0 0;
  text-wrap: pretty;
}

.nh-home .nd-actueel__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.nh-home .nd-actueel__shot {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--home-hairline);
  background: #fff;
  box-shadow: 0 12px 30px rgba(29, 29, 31, 0.08);
}


/* ─── 10. Eindbestemming CTA ─── */
.nh-eind {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 32px 72px;
  text-align: center;
}

.nh-eind__title {
  font-weight: 700;
  font-size: clamp(28px, 3.8vw, 44px);
  line-height: 1.18;
  margin: 24px 0 0;
  text-wrap: balance;
}

.nh-eind__text {
  color: var(--home-body);
  font-size: 16.5px;
  line-height: 1.7;
  max-width: 54ch;
  margin: 18px auto 0;
  text-wrap: pretty;
}

.nh-eind__cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}


/* ─── 11. FAQ (site pattern, homepage spacing + highlight row) ─── */
.nh-home .section--faq {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
  scroll-margin-top: calc(var(--header-height, 72px) + 24px);
}

.nh-home .faq__heading {
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.nh-home .faq-item__answer a {
  color: var(--home-teal);
  text-decoration: underline;
}

.nh-home .faq-item__answer a:hover,
.nh-home .faq-item__answer a:focus-visible {
  color: var(--home-teal-dark);
}


/* ─── 12. Slotquote ─── */
.nh-slot {
  background: #fff;
  border-top: 1.5px solid var(--home-hairline);
  padding: 96px 32px;
  text-align: center;
}

.nh-slot__kicker {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--home-teal);
  margin: 0 0 22px;
}

.nh-slot__quote {
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.25;
  margin: 0 auto;
  max-width: 22ch;
  text-wrap: balance;
}

.nh-slot__quote .nh-mark {
  padding: 2px 12px;
}


/* ═══════════════════════════════════════════════════════
   13. Responsive
   ═══════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .nh-hero {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: calc(var(--header-height, 72px) + 44px) 20px 36px;
  }

  .nh-hero__main { order: -1; }

  .nh-hero__side {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 22px;
  }

  .nh-hero__side--right { display: none; }

  .nh-hero__item {
    animation: none !important;
    opacity: 1;
    transform: rotate(var(--r, 0deg));
  }

  .nh-hero__item--1 { width: 124px; }
  .nh-hero__item--2 { width: 190px; }

  .nh-hero__cta {
    flex-direction: column;
    align-items: stretch;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .nh-section--boeken { padding-top: 64px; }
  .nh-slot { padding: 72px 24px; }
}

@media (max-width: 640px) {
  .nh-section,
  .nh-section--boeken,
  .nh-section--leraren,
  .nh-section--actueel,
  .nh-eind {
    padding-left: 20px;
    padding-right: 20px;
  }

  .nh-leraren__grid { gap: 28px; }
  .nh-home .nd-actueel__actions .nh-btn { flex: 1 1 200px; }
  .nh-slot { padding: 64px 20px; }

  /* Stack the rotating word under "Eén reis door" so the hero height stays
     constant on phones — "mens & maatschappij" would otherwise wrap while
     the shorter vakken don't, making the page jump every cycle. */
  .nh-vak { display: block; }
}

@media (max-width: 420px) {
  .nh-badge {
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 6px 14px;
  }

  .nh-hero { padding-left: 16px; padding-right: 16px; }
  .nh-hero__item--1 { width: 104px; }
  .nh-hero__item--2 { width: 160px; }
  .nh-vak { min-width: 0; }
  .nh-ticker__track { font-size: 13px; letter-spacing: 0.1em; }
  .nh-shelf { gap: 20px; }
  .nh-book { padding: 22px 18px 20px; }
  .nh-darkblock { border-radius: 20px; }
}


/* ═══════════════════════════════════════════════════════
   14. Reduced motion — everything still renders finished
   ═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .nh-home *,
  .nh-home *::before,
  .nh-home *::after,
  .nh-ticker__track,
  .nh-scrollcue__bar {
    animation: none !important;
    transition: none !important;
  }

  .nh-mark,
  .nh-mark--hero,
  .nh-mark--swipe,
  html.nh-anim .nh-mark--swipe {
    background-size: 100% 100% !important;
  }

  .nh-reveal,
  html.nh-anim .nh-reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .nh-hero__item {
    opacity: 1 !important;
    transform: rotate(var(--r, 0deg)) !important;
  }
}
