/* Reveal: de paginalaad- en scrollanimaties van de teampagina, voor elke pagina.
   De teampagina gebruikt deze nu zelf ook (de eigen kopie in team.css is weg).
   Werkt alleen als <html> de klasse rv-js heeft (zie head-snippet); zonder JS staat alles er gewoon. */

@keyframes rv-rise {
    from { opacity: 0; transform: translateY(1.25rem); }
    to   { opacity: 1; transform: none; }
}
@keyframes rv-word {
    from { transform: translateY(105%); }
    to   { transform: none; }
}
@keyframes rv-line {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* 1. Titel: woorden schuiven één voor één omhoog (data-rv-title) */
.rv-js [data-rv-title] .w {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    padding-bottom: 0.08em;
}
.rv-js [data-rv-title] .w > span {
    display: inline-block;
    animation: rv-word 0.9s var(--ease-soft) backwards;
    animation-delay: calc(var(--w, 0) * 70ms);
}

/* 2. Losse elementen en groepen: verborgen tot ze in beeld komen */
.rv-js [data-rv]:not(.is-in),
.rv-js [data-rv-group] > :not(.is-in) { opacity: 0; }

.rv-js [data-rv].is-in,
.rv-js [data-rv-group] > .is-in {
    animation: rv-rise 0.8s var(--ease-soft) backwards;
    animation-delay: calc(var(--i, 0) * 90ms + var(--rv-delay, 0ms));
}

/* Tekst direct onder een titel komt iets later, zoals op de teampagina */
.rv-js [data-rv="after-title"].is-in { --rv-delay: 250ms; animation-duration: 0.9s; }

/* 3. Lijsten binnen een item volgen het item (data-rv-sub op de lijst) */
.rv-js .is-in [data-rv-sub] > * {
    animation: rv-rise 0.6s var(--ease-soft) backwards;
    animation-delay: calc(var(--i, 0) * 90ms + 0.35s);
}
.rv-js .is-in [data-rv-sub] > :nth-child(2) { animation-delay: calc(var(--i, 0) * 90ms + 0.45s); }
.rv-js .is-in [data-rv-sub] > :nth-child(3) { animation-delay: calc(var(--i, 0) * 90ms + 0.55s); }
.rv-js .is-in [data-rv-sub] > :nth-child(n + 4) { animation-delay: calc(var(--i, 0) * 90ms + 0.65s); }

/* 4. Een onderrand die intekent (data-rv-line op een element met border-bottom) */
.rv-js [data-rv-line] { position: relative; border-bottom-color: transparent !important; }
.rv-js [data-rv-line]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: var(--rv-line-color, var(--line-on-dark));
    transform-origin: left;
    animation: rv-line 0.90s var(--ease-soft) 0.35s backwards;
}

/* 4b. A top line that draws in (data-rv-topline on an element whose ::before is the line) */
.rv-js [data-rv-topline]::before {
    transform-origin: left;
    animation: rv-line 0.90s var(--ease-soft) 0.45s backwards;
}
/* Links in a group with a top line wait until the line is under way */
.rv-js [data-rv-topline][data-rv-group] { --rv-delay: 600ms; }

@media (prefers-reduced-motion: reduce) {
    .rv-js [data-rv]:not(.is-in),
    .rv-js [data-rv-group] > :not(.is-in) { opacity: 1; }
    .rv-js [data-rv-title] .w > span,
    .rv-js [data-rv],
    .rv-js [data-rv-group] > *,
    .rv-js [data-rv-sub] > *,
    .rv-js [data-rv-line]::after { animation: none !important; }
}
/*home*/

/* 1. Intro: tekst en rijen faden in zodra de intro in beeld is */
.section.intro .content-inner {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.section.intro .content-inner.visible {
    opacity: 1;
    transform: none;
}

.section.intro .content-inner .row {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}
.section.intro .content-inner.visible .row {
    opacity: 1;
    transform: none;
}
.section.intro .content-inner.visible .row:nth-child(1) { transition-delay: 0.1s; }
.section.intro .content-inner.visible .row:nth-child(2) { transition-delay: 0.3s; }
.section.intro .content-inner.visible .row:nth-child(3) { transition-delay: 0.5s; }

/* 2. Klanten-ticker: fade-in na laden, eindeloos scrollen, pauze bij hover/focus/buiten beeld */
.ticker-rows {
    opacity: 0;
    transition: opacity 0.4s ease;
}
.client-ticker.is-ready .ticker-rows { opacity: 1; }

.ticker-track {
    animation: ticker-scroll var(--duration, 120s) linear infinite;
    will-change: transform;
}
.ticker-row:hover .ticker-track,
.ticker-row:focus-within .ticker-track,
.client-ticker.is-offscreen .ticker-track {
    animation-play-state: paused;
}
@keyframes ticker-scroll {
    to { transform: translate3d(-50%, 0, 0); }
}

/* 3. Bereik-zin in de hero: koraal onderstreping tekent in na het tellen */
.rem-reach-num::after {
    transform: scaleX(0);
    transition: transform 0.9s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}
.rem-reach.is-counted .rem-reach-num::after { transform: scaleX(1); }
.rem-reach.is-counted .rem-reach-part:nth-child(2) .rem-reach-num::after { transition-delay: 0.15s; }
.rem-reach.is-counted .rem-reach-part:nth-child(3) .rem-reach-num::after { transition-delay: 0.3s; }

/* 4. Klantverhalen: de actieve stip loopt vol tot het volgende verhaal */
.trust-testi.is-playing .trust-dot[aria-current="true"]::after {
    animation: trustDotFill var(--slide-ms, 7000ms) linear forwards;
}
.trust-testi.is-holding .trust-dot[aria-current="true"]::after {
    animation-play-state: paused;
}
@keyframes trustDotFill {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* Minder beweging: alles staat er meteen, ticker wordt een swipebare strook (zie home.css) */
@media (prefers-reduced-motion: reduce) {
    .section.intro .content-inner,
    .section.intro .content-inner .row {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .ticker-track { animation: none; }
    .ticker-rows { transition: none; }
    .rem-reach-num::after { transition: none; }
    .trust-testi.is-playing .trust-dot[aria-current="true"]::after { animation: none; }
}