/* Nieuwe homepage. Kleuren komen uit kleur.css (laad dat bestand eerst). */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--kleur-achtergrond);
  color: var(--kleur-donkergroen);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 3px solid var(--kleur-terracotta);
  outline-offset: 3px;
}

/* ---------- Knoppen ---------- */
.knop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.knop-terracotta {
  background: var(--kleur-terracotta);
  color: #ffffff;
}

.knop-terracotta:hover {
  background: var(--kleur-terracotta-hover);
}

.knop-lijn-klein {
  border-color: var(--kleur-zand);
  background: var(--kleur-kaart);
}

.knop-lijn-klein:hover {
  background: var(--kleur-zachtgroen);
}

/* ---------- BLOK 1: header ---------- */
.kop {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  /* Zelfde linkerrand als de inhoud op de pagina */
  padding: 14px max(4%, calc((100% - 1280px) / 2 + 4%));
  background: rgb(246 245 240 / 92%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--kleur-zachtgroen);
}

.logo {
  flex-shrink: 0;
}

.logo img {
  display: block;
  height: 44px;
  width: auto;
}

.menu {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  gap: 32px;
  margin-left: 40px;
}

.menu-link {
  position: relative;
  padding: 8px 0;
  font-size: 16px;
  white-space: nowrap;
}

a.menu-link:hover,
.menu-knop:hover {
  color: var(--kleur-terracotta-hover);
}

.menu-link.actief::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--kleur-terracotta);
  content: "";
}

/* ---------- Uitklapmenu's ---------- */
.menu-groep {
  position: relative;
}

/* De knop ziet eruit als een gewone menulink */
.menu-knop {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.menu-pijl {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  display: none;
  min-width: 240px;
  padding: 8px;
  border: 1px solid var(--kleur-zachtgroen);
  border-radius: 14px;
  background: var(--kleur-kaart);
  box-shadow: 0 12px 28px rgb(51 73 57 / 16%);
}

/* Open bij hover (muis) en bij focus (toetsenbord) */
.menu-groep:hover .submenu,
.menu-groep:focus-within .submenu {
  display: block;
}

.submenu-link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 15px;
  white-space: nowrap;
}

a.submenu-link:hover {
  background: var(--kleur-zachtgroen);
}

/* Pagina's die nog niet bestaan: grijs en niet klikbaar */
.uit {
  color: var(--kleur-tekst-zacht);
  cursor: not-allowed;
}

/* ---------- Taal en knoppen rechts ---------- */
.kop-acties {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
}

.taal-keuze {
  height: 44px;
  padding: 0 14px;
  border: 2px solid var(--kleur-zand);
  border-radius: 999px;
  background: var(--kleur-kaart);
  color: var(--kleur-donkergroen);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

/* ---------- BLOK 2: hero ---------- */

/* Een extra lichte kleur voor donkere vlakken (nog niet in kleur.css) */
:root {
  --home-terracotta-licht: #E0A07C;
}

.hero {
  display: flex;
  align-items: center;
  min-height: 640px;
  padding: 80px max(4%, calc((100% - 1280px) / 2 + 4%));
  /* Eerst de donkergroene laag, daaronder de foto */
  background:
    linear-gradient(90deg,
      rgb(38 56 44 / 96%) 0%,
      rgb(51 73 57 / 86%) 38%,
      rgb(51 73 57 / 25%) 72%,
      rgb(51 73 57 / 5%) 100%),
    url("../img/home-bg.png") 70% center / cover;
  color: #ffffff;
}

.hero-inhoud {
  max-width: 560px;
}

.hero-label {
  margin-bottom: 16px;
  color: var(--home-terracotta-licht);
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 20px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
}

.hero-tekst {
  margin-bottom: 32px;
  font-size: 18px;
  color: rgb(255 255 255 / 90%);
}

.hero-knoppen {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Lichte knop met rand, voor op de donkere foto */
.knop-lijn-licht {
  border-color: rgb(255 255 255 / 70%);
  color: #ffffff;
}

.knop-lijn-licht:hover {
  background: rgb(255 255 255 / 15%);
}

/* Zachte schaduw en lichte beweging op knoppen */
.knop {
  box-shadow: 0 4px 12px rgb(51 73 57 / 18%);
  transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.knop:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgb(51 73 57 / 24%);
}

/* ---------- BLOK 3: Hoe het werkt ---------- */

/* Algemene stijl voor alle blokken onder de hero */
.blok {
  padding: 96px max(4%, calc((100% - 1280px) / 2 + 4%));
}

.blok-label {
  margin-bottom: 12px;
  color: var(--kleur-terracotta-hover);
  font-size: 13px;
  font-weight: bold;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blok h2 {
  max-width: 640px;
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.blok-intro {
  max-width: 560px;
  font-size: 18px;
  color: var(--kleur-tekst-zacht);
}

.stappen {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
  list-style: none;
}

.stap-kaart {
  padding: 28px;
  border-radius: 24px;
  background: var(--kleur-kaart);
  box-shadow: 0 4px 16px rgb(51 73 57 / 8%);
}

.stap-nummer {
  display: block;
  margin-bottom: 24px;
  color: var(--kleur-zand);
  font-size: 36px;
  font-weight: bold;
  text-align: right;
}

.stap-kaart h3 {
  margin-bottom: 8px;
  font-size: 22px;
}

.stap-kaart p {
  color: var(--kleur-tekst-zacht);
  font-size: 15px;
}

/* De vierde kaart is donkergroen */
.stap-donker {
  background: var(--kleur-donkergroen);
  color: #ffffff;
}

.stap-donker .stap-nummer {
  color: var(--home-terracotta-licht);
}

.stap-donker p {
  color: rgb(255 255 255 / 85%);
}

/* Kleinere schermen: eerst 2 kaarten naast elkaar, daarna 1 */
@media (max-width: 1000px) {
  .stappen {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .stappen {
    grid-template-columns: 1fr;
  }
}

/* ---------- Beweging ---------- */

/* Hero: de tekst komt zacht omhoog als de pagina opent */
@keyframes opkomen {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-inhoud > * {
  animation: opkomen 800ms ease both;
}

.hero-inhoud > :nth-child(2) { animation-delay: 120ms; }
.hero-inhoud > :nth-child(3) { animation-delay: 240ms; }
.hero-inhoud > :nth-child(4) { animation-delay: 360ms; }

/* Blokken verschijnen als je ze in beeld scrolt */
.js .verschijn {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js .verschijn.zichtbaar {
  opacity: 1;
  transform: none;
}

/* Kaarten: verschijnen eerst, en reageren daarna snel op de muis */
.js .stap-kaart.verschijn {
  transition:
    opacity 700ms ease,
    transform 700ms ease,
    translate 250ms ease,
    scale 250ms ease,
    box-shadow 250ms ease;
}

.stap-nummer {
  transition: color 250ms ease;
}

/* Muis op een kaart: groter, omhoog en meer schaduw */
.stap-kaart:hover {
  translate: 0 -8px;
  scale: 1.04;
  box-shadow: 0 20px 40px rgb(51 73 57 / 22%);
}

.stap-kaart:hover .stap-nummer {
  color: var(--kleur-terracotta);
}

.stap-donker:hover .stap-nummer {
  color: #ffffff;
}

/* Geen beweging voor mensen die dat liever niet willen */
@media (prefers-reduced-motion: reduce) {
  .hero-inhoud > *,
  .js .verschijn {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }

  .stap-kaart:hover {
    translate: none;
    scale: none;
  }
}

/* ---------- BLOK 4: Jouw route ---------- */
.blok-groen {
  background: var(--kleur-zachtgroen);
}

.blok-route {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.punten {
  display: grid;
  gap: 14px;
  margin: 28px 0 32px;
  list-style: none;
}

.punten li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

/* Groen rondje met een vinkje */
.vinkje {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--kleur-groen);
}

.vinkje svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* De voorbeeldkaart */
.route-kaart {
  padding: 32px;
  border-radius: 28px;
  background: var(--kleur-kaart);
  box-shadow: 0 20px 48px rgb(51 73 57 / 14%);
}

.route-kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.route-kop h3 {
  font-size: 28px;
}

.badge {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(160 103 73 / 15%);
  color: var(--kleur-terracotta-hover);
  font-size: 12px;
  font-weight: bold;
}

.route-info {
  margin: 4px 0 12px;
  color: var(--kleur-tekst-zacht);
  font-size: 14px;
}

.voortgang {
  height: 8px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: var(--kleur-zachtgroen);
  overflow: hidden;
}

.voortgang-balk {
  height: 100%;
  border-radius: 999px;
  background: var(--kleur-groen);
}

.route-lijst {
  display: grid;
  gap: 12px;
  list-style: none;
}

.route-stap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: var(--kleur-achtergrond);
}

.route-nummer {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--kleur-zachtgroen);
  font-size: 13px;
  font-weight: bold;
}

.route-stap-tekst {
  flex: 1;
  font-size: 15px;
}

.route-tag {
  color: var(--kleur-tekst-zacht);
  font-size: 12px;
}

/* Klaar: doorgestreept */
.route-stap.klaar .route-stap-tekst {
  color: var(--kleur-tekst-zacht);
  text-decoration: line-through;
}

/* Volgende stap: oranje rand */
.route-stap.volgende {
  border-color: var(--kleur-terracotta);
  background: var(--kleur-kaart);
  font-weight: bold;
}

.route-stap.volgende .route-nummer {
  background: var(--kleur-terracotta);
  color: #ffffff;
}

.route-stap.volgende .route-tag {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(160 103 73 / 15%);
  color: var(--kleur-terracotta-hover);
  font-weight: bold;
}

@media (max-width: 900px) {
  .blok-route {
    grid-template-columns: 1fr;
  }
}

/* ---------- Beweging op de route-kaart ---------- */

/* De balk loopt vol als de kaart in beeld komt */
.voortgang-balk {
  width: 40%;
}

.js .voortgang-balk {
  width: 0;
  transition: width 1200ms ease 500ms;
}

.js .route-kaart.zichtbaar .voortgang-balk {
  width: 40%;
}

/* De stappen komen na elkaar binnen */
.js .route-stap {
  opacity: 0;
}

.js .route-kaart.zichtbaar .route-stap {
  animation: opkomen 600ms ease both;
}

.js .route-kaart.zichtbaar .route-stap:nth-child(1) { animation-delay: 300ms; }
.js .route-kaart.zichtbaar .route-stap:nth-child(2) { animation-delay: 450ms; }
.js .route-kaart.zichtbaar .route-stap:nth-child(3) { animation-delay: 600ms; }
.js .route-kaart.zichtbaar .route-stap:nth-child(4) { animation-delay: 750ms; }
.js .route-kaart.zichtbaar .route-stap:nth-child(5) { animation-delay: 900ms; }

/* Muis op een stap: een beetje groter */
.route-stap {
  transition: scale 200ms ease;
}

.route-stap:hover {
  scale: 1.03;
}

/* De volgende stap pulseert rustig */
@keyframes puls {
  0%   { box-shadow: 0 0 0 0 rgb(160 103 73 / 35%); }
  70%  { box-shadow: 0 0 0 10px rgb(160 103 73 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(160 103 73 / 0%); }
}

.route-stap.volgende {
  animation: puls 2s ease-out 1.6s infinite;
}

/* Geen beweging voor mensen die dat liever niet willen */
@media (prefers-reduced-motion: reduce) {
  .js .voortgang-balk {
    width: 40%;
    transition: none;
  }

  .js .route-stap {
    opacity: 1;
    animation: none;
  }

  .route-stap.volgende {
    animation: none;
  }

  .route-stap:hover {
    scale: none;
  }
}

/* De kaarten van "Hoe het werkt" komen na elkaar (alleen voor opacity en transform) */
.js .stap-kaart.verschijn:nth-child(2) { transition-delay: 120ms, 120ms, 0s, 0s, 0s; }
.js .stap-kaart.verschijn:nth-child(3) { transition-delay: 240ms, 240ms, 0s, 0s, 0s; }
.js .stap-kaart.verschijn:nth-child(4) { transition-delay: 360ms, 360ms, 0s, 0s, 0s; }

/* ---------- Menu op de telefoon (hamburger) ---------- */

/* Tekst alleen voor schermlezers: onzichtbaar op het scherm */
.verborgen {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Op de computer zie je de knop niet */
.menu-toggle {
  display: none;
}

@media (max-width: 900px) {
  /* Het logo iets kleiner, en alles mag naar een nieuwe regel */
  .kop {
    flex-wrap: wrap;
    gap: 0;
  }

  .logo img {
    height: 36px;
  }

  /* De knop met drie streepjes, rechts */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 2px solid var(--kleur-zand);
    border-radius: 12px;
    background: var(--kleur-kaart);
    cursor: pointer;
  }

  .menu-toggle-streep {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--kleur-donkergroen);
    transition: transform 200ms ease, opacity 200ms ease;
  }

  /* Het menu en de knoppen rechts zijn eerst verborgen */
  .menu,
  .kop-acties {
    display: none;
    flex-basis: 100%;
  }

  /* Menu open: de links onder elkaar */
  .kop.open .menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 12px 0 0;
    padding-top: 8px;
    border-top: 1px solid var(--kleur-zachtgroen);
  }

  .kop.open .menu-link {
    padding: 12px 0;
  }

  .kop.open .menu-knop {
    width: 100%;
  }

  /* Het uitklapmenu "Ontdek" staat in het menu, niet erboven */
  .kop.open .submenu {
    position: static;
    min-width: 0;
    padding: 0 0 8px 16px;
    border: 0;
    box-shadow: none;
    background: none;
  }

  /* Menu open: taal en knoppen onderaan */
  .kop.open .kop-acties {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0 4px;
  }

  /* Menu open: de streepjes worden een kruisje */
  .kop.open .menu-toggle-streep:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .kop.open .menu-toggle-streep:nth-child(2) {
    opacity: 0;
  }

  .kop.open .menu-toggle-streep:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-toggle-streep {
    transition: none;
  }
}