/* ================================================================
   AI Campaign Lab — Animation System
   Apple-stijl: doelgericht, subtiel, nooit afleidend.

   Principe: animaties ondersteunen begrip. Ze trekken nooit
   de aandacht naar zichzelf. Geen bouncy springs, geen glow-
   pulsjes, geen decoratieve beweging zonder doel.
   ================================================================ */

/* ─── Keyframes ──────────────────────────────────────────────── */

/* Pagina-intrede — de standaard Apple fade-from-below */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hero-headline reveal — letter-spacing compress */
@keyframes headline-in {
  from {
    opacity: 0;
    transform: translateY(24px);
    letter-spacing: -0.01em;
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Voortgangsbalk */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* Spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Vinkje-pop (micro-interactie bij aanvinken) */
@keyframes check-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.28); }
  70%  { transform: scale(0.92); }
  100% { transform: scale(1); }
}

/* Subtiele hero-gloed — langzame opacity puls */
@keyframes glow-breathe {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 0.90; }
}

/* ─── Instapklassen — gestaggerd ────────────────────────────── */
/* Apple gebruikt consistente 0.4s entries met lichte vertraging. */

.anim-fade-up {
  animation: fade-up var(--duration-slow, 0.4s) var(--ease-out, cubic-bezier(0,0,.2,1)) both;
}
.anim-fade-up-1 {
  animation: fade-up var(--duration-slow, 0.4s) var(--ease-out, cubic-bezier(0,0,.2,1)) 0.06s both;
}
.anim-fade-up-2 {
  animation: fade-up var(--duration-slow, 0.4s) var(--ease-out, cubic-bezier(0,0,.2,1)) 0.14s both;
}
.anim-fade-up-3 {
  animation: fade-up var(--duration-slow, 0.4s) var(--ease-out, cubic-bezier(0,0,.2,1)) 0.22s both;
}
.anim-fade-up-4 {
  animation: fade-up var(--duration-slow, 0.4s) var(--ease-out, cubic-bezier(0,0,.2,1)) 0.32s both;
}
.anim-fade-up-5 {
  animation: fade-up var(--duration-slow, 0.4s) var(--ease-out, cubic-bezier(0,0,.2,1)) 0.44s both;
}
.anim-scale-in {
  animation: scale-in 0.35s var(--ease-out, cubic-bezier(0,0,.2,1)) both;
}
.anim-fade-in {
  animation: fade-in 0.3s ease both;
}

/* Headline-specifiek (iets langer) */
.anim-headline {
  animation: headline-in 0.6s var(--ease-out, cubic-bezier(0,0,.2,1)) both;
}

/* ─── Hover-lift ────────────────────────────────────────────── */
/* Apple's hover: heel subtiel — 1-2px lift, lichte shadow toename. */
.hover-lift {
  transition:
    transform  var(--duration, 0.25s) var(--ease, cubic-bezier(0.25,0.46,0.45,0.94)),
    box-shadow var(--duration, 0.25s) var(--ease, cubic-bezier(0.25,0.46,0.45,0.94));
}
.hover-lift:hover {
  transform: translateY(-2px);
}

/* ─── Interactieve elementen ────────────────────────────────── */
/* Apple gebruikt opacity-dimming, geen color-changes. */
.hover-dim {
  transition: opacity var(--duration-fast, 0.15s) ease;
}
.hover-dim:hover { opacity: 0.82; }

/* Scale op press */
.press-scale {
  transition: transform 0.1s ease;
}
.press-scale:active { transform: scale(0.98); }

/* Check-animatie */
.check-animate {
  animation: check-pop 0.3s var(--ease-out, cubic-bezier(0,0,.2,1)) both;
}

/* ─── Spinner ───────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-top-color: var(--accent, #0071e3);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

/* ─── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
