/* Animatie 02: Foto's. De iPad blijft staan, alleen het scherm wisselt.
   Tijdlijn (lus van 10 s, 1 s = 10%): 0,0 vastleggen · 3,2 vergelijken · 6,6 opvolgen · 9,7 terug naar de camera */

/* ── iPad en handen ──────────────────────────────────────── */
.cm02-ipad {
    position: absolute;
    left: 46px;
    top: 80px;
    width: 548px;
    height: 400px;
    padding: 14px;
    border-radius: 28px;
    background: var(--ink);
    box-shadow:
        0 24px 48px rgba(20, 33, 31, 0.12),
        0 2px 6px rgba(20, 33, 31, 0.06);
}
.cm02-screen {
    position: relative;
    height: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: #f5f7f6;
}
.cm02-hands {
    position: absolute;
    inset: 0;
    overflow: visible;
    fill: rgba(94, 107, 105, 0.35);
}
.cm02-hl { animation-name: cm02-hl; }
.cm02-hr { animation-name: cm02-hr; }
.cm02-tap { animation-name: cm02-tap; }
.cm02-hl,
.cm02-hr,
.cm02-tap {
    opacity: 0;
}
@keyframes cm02-hl {
    0%, 2% { opacity: 0; translate: -20px 0; }
    6%, 24% { opacity: 1; translate: 0 0; }
    28%, 100% { opacity: 0; translate: -20px 0; }
}
@keyframes cm02-hr {
    0%, 2% { opacity: 0; translate: 20px 0; }
    6%, 24% { opacity: 1; translate: 0 0; }
    28%, 100% { opacity: 0; translate: 20px 0; }
}
/* Rechterduim: rust naast de sluiterknop en tikt erop op 1,1 s */
@keyframes cm02-tap {
    0%, 2% { opacity: 0; translate: 32px 14px; }
    6%, 9.5% { opacity: 1; translate: 12px 14px; }
    11% { translate: 0 0; }
    13%, 24% { opacity: 1; translate: 12px 14px; }
    28%, 100% { opacity: 0; translate: 32px 14px; }
}

/* Schermen: crossfade van 0,3 s. Basisstijl = statisch beeld van scène 2 */
.cm02-scr {
    position: absolute;
    inset: 0;
}
.cm02-s1,
.cm02-s3 {
    opacity: 0;
}
.cm02-s1 { animation-name: cm02-s1; }
.cm02-s2 { animation-name: cm02-s2; }
.cm02-s3 { animation-name: cm02-s3; }
@keyframes cm02-s1 {
    0%, 32% { opacity: 1; }
    35%, 97% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes cm02-s2 {
    0%, 32% { opacity: 0; }
    35%, 66% { opacity: 1; }
    69%, 100% { opacity: 0; }
}
@keyframes cm02-s3 {
    0%, 66% { opacity: 0; }
    69%, 97% { opacity: 1; }
    100% { opacity: 0; }
}

/* Foto: lichte achtergrond met het gezicht gecentreerd */
.cm02-photo {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #dde3e1;
}
.cm02-photo svg {
    display: block;
}

/* ── Scène 1: vastleggen ─────────────────────────────────── */
.cm02-cam {
    background: #2a3836;
}
.cm02-cam > svg {
    position: absolute;
    left: 142px;
    top: 26px;
}
.cm02-frame {
    position: absolute;
    left: 130px;
    top: 16px;
    width: 260px;
    height: 240px;
    background:
        linear-gradient(#fff, #fff) 0 0 / 28px 3px,
        linear-gradient(#fff, #fff) 0 0 / 3px 28px,
        linear-gradient(#fff, #fff) 100% 0 / 28px 3px,
        linear-gradient(#fff, #fff) 100% 0 / 3px 28px,
        linear-gradient(#fff, #fff) 0 100% / 28px 3px,
        linear-gradient(#fff, #fff) 0 100% / 3px 28px,
        linear-gradient(#fff, #fff) 100% 100% / 28px 3px,
        linear-gradient(#fff, #fff) 100% 100% / 3px 28px;
    background-repeat: no-repeat;
}
.cm02-shutter {
    position: absolute;
    left: 460px;
    top: 114px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 0 4px #2a3836,
        0 0 0 6px #fff;
    animation-name: cm02-shutter;
}
@keyframes cm02-shutter {
    0%, 10.5% { scale: 1; }
    12% { scale: 0.9; }
    13.5%, 100% { scale: 1; }
}
.cm02-strip {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100px;
    background: rgba(0, 0, 0, 0.28);
}
.cm02-slot {
    position: absolute;
    left: 20px;
    top: 13px;
    width: 104px;
    height: 74px;
    border: 2px dashed rgba(255, 255, 255, 0.35);
    border-radius: 8px;
}
.cm02-label {
    position: absolute;
    left: 144px;
    top: 39px;
    font: 600 18px/1 var(--ui);
    color: #fff;
    animation-name: cm02-label;
}
@keyframes cm02-label {
    0%, 21% { opacity: 0; }
    24%, 100% { opacity: 1; }
}
/* De gemaakte foto krimpt tot miniatuur (104x74) in de strip */
.cm02-shot {
    position: absolute;
    inset: 0;
    border-radius: 40px;
    background: #2a3836;
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.6);
    transform-origin: 0 0;
    opacity: 0;
    animation-name: cm02-shot;
}
.cm02-shot svg {
    position: absolute;
    left: 142px;
    top: 26px;
}
@keyframes cm02-shot {
    0%, 12% { opacity: 0; translate: 0 0; scale: 1; }
    12.1%, 16% { opacity: 1; translate: 0 0; scale: 1; }
    23%, 35% { opacity: 1; translate: 20px 285px; scale: 0.2; }
    35.1%, 100% { opacity: 0; translate: 0 0; scale: 1; }
}
.cm02-flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    animation-name: cm02-flash;
}
@keyframes cm02-flash {
    0%, 12% { opacity: 0; }
    12.1% { opacity: 0.8; }
    13.5%, 100% { opacity: 0; }
}

/* ── Scène 2: vergelijken ────────────────────────────────── */
@property --cm02-x {
    syntax: "<percentage>";
    inherits: true;
    initial-value: 50%;
}
.cm02-pair {
    position: absolute;
    top: 84px;
    width: 200px;
    font: 600 17px/1 var(--ui);
    text-align: center;
    opacity: 0;
}
.cm02-pair .cm02-photo {
    height: 143px;
    margin-bottom: 14px;
}
.cm02-pair:nth-of-type(1) {
    left: 50px;
    animation-name: cm02-pl;
}
.cm02-pair:nth-of-type(2) {
    left: 270px;
    animation-name: cm02-pr;
}
@keyframes cm02-pl {
    0%, 37% { opacity: 1; translate: 0 0; scale: 1; }
    44%, 100% { opacity: 0; translate: 40px 0; scale: 1.15; }
}
@keyframes cm02-pr {
    0%, 37% { opacity: 1; translate: 0 0; scale: 1; }
    44%, 100% { opacity: 0; translate: -40px 0; scale: 1.15; }
}
.cm02-split {
    position: absolute;
    inset: 0;
    animation-name: cm02-split;
}
@keyframes cm02-split {
    0%, 37% { opacity: 0; clip-path: inset(22% 10% 32% 10% round 14px); --cm02-x: 50%; }
    44%, 45% { opacity: 1; clip-path: inset(0 0 0 0 round 0px); --cm02-x: 50%; }
    49% { --cm02-x: 30%; }
    56% { --cm02-x: 70%; }
    61%, 100% { opacity: 1; clip-path: inset(0 0 0 0 round 0px); --cm02-x: 50%; }
}
.cm02-split .cm02-photo {
    position: absolute;
    inset: 0;
    border-radius: 0;
}
.cm02-split .cm02-photo + .cm02-photo {
    clip-path: inset(0 0 0 var(--cm02-x));
}
.cm02-tag {
    position: absolute;
    top: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    font: 600 16px/1 var(--ui);
}
.cm02-tag:first-of-type { left: 16px; }
.cm02-tag:last-of-type { right: 16px; }
.cm02-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--cm02-x);
    width: 3px;
    margin-left: -1.5px;
    background: #fff;
}
.cm02-bar::before,
.cm02-bar::after {
    content: "";
    position: absolute;
    left: 50%;
    border-radius: 50%;
    translate: -50% -50%;
}
/* Handvat en de vingertop die het volgt */
.cm02-bar::before {
    top: 50%;
    width: 36px;
    height: 36px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(20, 33, 31, 0.18);
}
.cm02-bar::after {
    top: calc(50% + 34px);
    width: 44px;
    height: 44px;
    background: rgba(20, 33, 31, 0.15);
    opacity: 0;
    animation: cm02-finger var(--T) var(--ease) infinite both;
}
@keyframes cm02-finger {
    0%, 44% { opacity: 0; }
    46%, 60% { opacity: 1; }
    62%, 100% { opacity: 0; }
}

/* ── Scène 3: opvolgen ───────────────────────────────────── */
.cm02-line {
    position: absolute;
    left: 55px;
    top: 70px;
    bottom: 70px;
    width: 2px;
    background: var(--ink-2);
    opacity: 0.5;
}
.cm02-moment {
    position: absolute;
    left: 48px;
    right: 0;
    display: flex;
    align-items: center;
    gap: 22px;
    height: 74px;
    font: 600 17px/1 var(--ui);
    font-variant-numeric: tabular-nums;
}
.cm02-moment::before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 4px #f5f7f6;
}
.cm02-moment > span:first-child {
    width: 66px;
}
.cm02-moment .cm02-photo {
    width: 104px;
    height: 74px;
}
.cm02-moment .cm-pill {
    animation-name: cm02-ok;
}
@keyframes cm02-ok {
    0%, 71% { opacity: 0; translate: 8px 0; }
    74%, 100% { opacity: 1; translate: 0 0; }
}
