/*
 * animations.css — subtiele animaties bovenop het originele ontwerp.
 * Gebruikt de losse `translate`/`scale`-eigenschappen, zodat het niet botst
 * met de bestaande Tailwind-transforms. Bij "minder beweging" staat alles uit.
 */

:root {
  --anim-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Openingsbeeld (bij laden van de pagina) ---------- */
@keyframes anim-fade-up {
  from { opacity: 0; translate: 0 26px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes anim-image-in {
  from { opacity: 0; scale: 1.16; }
  to { opacity: 1; scale: 1.08; } /* 8% speling voor het parallax-effect */
}
@keyframes anim-shape-in {
  from { opacity: 0; translate: 0 -18px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes anim-drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 10px; }
}

.header__text > * {
  animation: anim-fade-up 0.9s var(--anim-ease) both;
}
.header__text > :nth-child(1) { animation-delay: 0.08s; }
.header__text > :nth-child(2) { animation-delay: 0.2s; }
.header__text > :nth-child(3) { animation-delay: 0.32s; }
.header__text > :nth-child(4) { animation-delay: 0.44s; }

.header__media {
  overflow: hidden;
}
.header__media img {
  animation: anim-image-in 1.4s var(--anim-ease) both;
  animation-delay: 0.1s;
}
.header__shape {
  animation: anim-shape-in 1.2s var(--anim-ease) both;
}

/* ---------- Verschijnen bij scrollen (klassen worden door JS gezet) ---------- */
/* 'html' erbij voor extra gewicht, zodat hover-transities dit niet overschrijven */
html .anim-reveal {
  opacity: 0;
  translate: 0 32px;
  transition: opacity 0.9s var(--anim-ease), translate 0.9s var(--anim-ease);
  transition-delay: var(--anim-delay, 0s);
}
html .anim-reveal.anim-from-left { translate: -40px 0; }
html .anim-reveal.anim-from-right { translate: 40px 0; }
html .anim-reveal.is-visible {
  opacity: 1;
  translate: 0 0;
}
/* Op smalle schermen alles van onderen laten komen (niets opzij) */
@media (max-width: 900px) {
  html .anim-reveal.anim-from-left,
  html .anim-reveal.anim-from-right { translate: 0 32px; }
  html .anim-reveal.is-visible { translate: 0 0; }
}
/* Afdrukken / PDF: altijd alles tonen */
@media print {
  html .anim-reveal { opacity: 1 !important; translate: none !important; transition: none !important; }
  .anim-shapes { display: none; }
  .has-anim-shapes > picture { opacity: 1; }
}

/* ---------- Scroll-effecten (parallax, waarden worden door JS gezet) ---------- */
.anim-parallax {
  will-change: translate;
}
.header__text.anim-parallax {
  will-change: translate, opacity;
}

/* ---------- Afgeronde hoeken behouden bij in- en uitzoomen ---------- */
.header__media--left .asp-base,
.introduction__image .asp-base {
  border-radius: 0.75rem;
  overflow: hidden;
  isolation: isolate;
}
.paragraphs__item--media .asp-base {
  border-radius: 0.5rem;
  overflow: hidden;
  isolation: isolate;
}
.paragraphs--frontpage .paragraphs__item--media .asp-base {
  border-radius: 0.75rem;
}

/* ---------- Hover-effecten (alleen met muis, niet 'blijven hangen' op touch) ---------- */
.clickblock__content {
  transition: translate 0.45s var(--anim-ease), box-shadow 0.45s var(--anim-ease);
}
.clickblock__media .asp-base img {
  transition-duration: 0.8s !important;
  transition-timing-function: var(--anim-ease) !important;
}
.paragraphs__item--media img,
.introduction__image img {
  transition: scale 1s var(--anim-ease);
}
.btn-solid--gradient,
.btn-transp--primary,
.btn-transp--white,
.form__button--submit > input {
  transition-property: all;
  transition-duration: 0.35s;
}
.references__item {
  transition: translate 0.45s var(--anim-ease), box-shadow 0.45s var(--anim-ease);
}
.usps__item {
  transition: translate 0.4s var(--anim-ease);
}
.cta-inline__employee-image img {
  transition: scale 0.6s var(--anim-ease);
}

@media (hover: hover) and (pointer: fine) {
  /* Klikblokken: licht optillen */
  .clickblock__content:has(.block-link):hover {
    translate: 0 -6px;
    box-shadow: 0 22px 40px -24px rgb(128 38 42 / 0.45);
  }
  .clickblock__content:has(.block-link):hover .btn-text--primary {
    letter-spacing: 0.01em;
  }
  /* Afbeeldingen in de alinea's: zachte zoom */
  .paragraphs__item--media:hover img,
  .introduction__image:hover img {
    scale: 1.04;
  }
  /* Knoppen: iets omhoog met een zachte gloed */
  .btn-solid--gradient:hover,
  .form__button--submit > input:hover {
    translate: 0 -2px;
    box-shadow: 0 12px 24px -12px rgb(230 89 46 / 0.65);
  }
  .btn-transp--primary:hover,
  .btn-transp--white:hover {
    translate: 0 -2px;
  }
  /* Klantverhalen: optillen */
  .references__item:hover {
    translate: 0 -4px;
    box-shadow: 0 18px 36px -24px rgb(128 38 42 / 0.4);
  }
  /* USP's */
  .usps__item:hover {
    translate: 0 -3px;
  }
  /* Contactpersoon: foto ademt zacht mee */
  .cta-inline:hover .cta-inline__employee-image img {
    scale: 1.05;
  }
}

/* Vormen in de oranje CTA bewegen heel langzaam */
.cta__shape-inner {
  animation: anim-drift 9s ease-in-out infinite;
}

/* Header krijgt een zachte schaduw zodra je scrolt */
header.nav {
  transition: box-shadow 0.3s ease;
}
header.nav.is-scrolled {
  box-shadow: 0 8px 24px -18px rgb(42 19 22 / 0.45);
}

/* ---------- Minder beweging ---------- */
@media (prefers-reduced-motion: reduce) {
  .header__text > *,
  .header__media img,
  .header__shape,
  .cta__shape-inner {
    animation: none !important;
  }
  .anim-parallax {
    translate: none !important;
    opacity: 1 !important;
  }
  .anim-reveal {
    opacity: 1 !important;
    translate: none !important;
    transition: none !important;
  }
  .clickblock__content:has(.block-link):hover,
  .references__item:hover,
  .usps__item:hover,
  .btn-solid--gradient:hover,
  .btn-transp--primary:hover,
  .btn-transp--white:hover {
    translate: none;
  }
  .paragraphs__item--media:hover img,
  .introduction__image:hover img,
  .cta-inline:hover .cta-inline__employee-image img {
    scale: 1;
  }
}

/* ---------- Bewegende vormen (vervangt de statische vormen-afbeelding) ---------- */
.anim-shapes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.has-anim-shapes > picture {
  opacity: 0;
}
.anim-shapes .shape-depth {
  transform: translate(
    calc((var(--shape-mx, 0) * var(--d)) * 1px),
    calc((var(--shape-my, 0) * var(--d) + var(--shape-sy, 0) * var(--d)) * 1px)
  );
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-shapes .shape-blob {
  transform-box: fill-box;
  transform-origin: center;
  animation: anim-blob var(--dur, 24s) ease-in-out var(--delay, 0s) infinite alternate;
}
@keyframes anim-blob {
  from { translate: 0 0; scale: 1; }
  to { translate: var(--dx, 30px) var(--dy, 10px); scale: var(--s, 1.06); }
}
.anim-shapes.is-paused .shape-blob,
body:not(.nav--open) .nav__mobile-shape .shape-blob {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .anim-shapes .shape-blob { animation: none; }
  .anim-shapes .shape-depth { transform: none; transition: none; }
}

/* ---------- Mobiel: niets mag buiten het scherm steken ---------- */
/* De grote foto bovenaan schuift op smalle schermen iets uit; knip horizontaal af. */
/* (inschuivende foto's staan vóór het verschijnen 40px naast hun plek) */
html,
body {
  overflow-x: clip;
}
section.header {
  overflow-x: clip;
}
@supports not (overflow: clip) {
  body { overflow-x: hidden; }
}

/* ---------- Mobiel menu: gesloten = niet focusbaar / niet voorgelezen ---------- */
@media (max-width: 1224px) {
  body:not(.nav--open) .nav__mobile-menu {
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
  }
  body.nav--open .nav__mobile-menu {
    visibility: visible;
    /* bij openen meteen zichtbaar (geen vertraging op visibility), daarna infaden */
    transition: opacity 0.3s ease, visibility 0s linear 0s;
  }
}

/* ---------- Footer: kleine juridische links beter leesbaar ---------- */
.footer__copyright a,
.footer__copyright span {
  color: #6b6b6b;
}

/* ---------- Telefoonveld (type="tel") dezelfde stijl als de andere velden ---------- */
form input[type=tel] {
  background: #f5f4f3;
  border: 1px solid #f5f4f3;
  border-radius: 12px;
  height: 54px;
  width: 100%;
  padding: 12px 24px;
  font-family: 'Clear Sans', sans-serif;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: color 0.5s, background-color 0.5s, border-color 0.5s;
}
form input[type=tel]::placeholder {
  color: rgb(0 0 0 / 0.4);
  font-family: 'Clear Sans', sans-serif;
}
form input[type=tel]:focus {
  border-color: #282828;
}

/* ---------- Leesbaarheid: oranje tekst op licht vlak iets dieper (WCAG AA, 4,9:1) ----------
   De oranje vlakken (#e6592e) blijven ongewijzigd; alleen tekst/randen op wit en lichtgrijs. */
main p a,
main ol li a,
main ul li a,
footer p a,
.btn-text--primary,
.form__checkbox label a,
.cta-inline__links a i,
.cta-inline__links a strong,
.footer__links a:hover,
.footer__social:hover,
.footer__link:hover,
.footer__copyrights a:hover,
header.nav .nav__bottom .nav__container nav ul > li a:hover,
header.nav .nav__bottom .nav__container nav ul > li a[aria-current='page'] {
  color: #c4461f;
}
.btn-transp--primary,
.references__loadmore a {
  color: #c4461f;
  border-color: #c4461f;
}
.btn-transp--primary:hover,
.references__loadmore a:hover {
  background-color: #c4461f;
  color: #fff;
}
.quotes__arrows button {
  border-color: #c4461f;
  color: #c4461f;
}
@media (hover: hover) and (pointer: fine) {
  .quotes__arrows button:hover { background: #c4461f; color: #fff; }
}
/* in het (oranje) mobiele menu en de oranje vlakken blijven links wit */
.nav__mobile-menu a,
.nav__mobile-menu ul li a,
.header p a,
.cta p a {
  color: inherit;
}

/* ---------- Formulieren (Web3Forms) ---------- */
.web3forms-botcheck {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}
/* groene bevestiging iets donkerder voor leesbaarheid (4,5:1) */
.form__notification--success {
  border-color: #15803d;
  color: #15803d;
}
.form__notification:focus {
  outline: none;
}
.form__button--submit > input:disabled {
  opacity: 0.7;
  cursor: progress;
}
