/* ==========================================================================
   ANIMATIONS.CSS
   Keyframes and the classes that trigger them. All motion here is
   deliberately subtle and matches the concept PDF's tone (no bounce,
   no elaborate motion) — reveal/fade/scale only, plus the checkmark
   draw-in used by the Thank You modal.
   ========================================================================== */

/* ---------------------------------------------------------------------
   Keyframes
   --------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes checkmarkDraw {
  from { stroke-dashoffset: 48; }
  to { stroke-dashoffset: 0; }
}

@keyframes checkmarkCircle {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------------------------------------------------------------------
   Scroll-reveal utility classes (toggled by animations.js via
   IntersectionObserver — element gets .is-visible added when it
   enters the viewport)
   --------------------------------------------------------------------- */
[data-animate] {
  opacity: 0;
}

[data-animate="fade-up"] {
  transform: translateY(16px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
[data-animate="fade-up"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-animate="fade"] {
  transition: opacity var(--transition-slow);
}
[data-animate="fade"].is-visible {
  opacity: 1;
}

[data-animate="scale"] {
  transform: scale(0.96);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}
[data-animate="scale"].is-visible {
  opacity: 1;
  transform: scale(1);
}

/* ---------------------------------------------------------------------
   Modal entrance animation
   --------------------------------------------------------------------- */
.modal-overlay.is-open {
  animation: fadeIn var(--transition-base) ease forwards;
}
.modal.is-open {
  animation: scaleIn var(--transition-base) ease forwards;
}

/* ---------------------------------------------------------------------
   Thank You success checkmark
   Stroke color is set here (not as an inline style="" on the SVG in
   the HTML — every page previously repeated `style="color: var(...)"`
   on two elements, which both violates the "no inline styles" and
   "no duplicate code" requirements).
   --------------------------------------------------------------------- */
.success-check__circle {
  color: var(--color-success);
  animation: checkmarkCircle var(--transition-slow) ease forwards;
}
.success-check__mark {
  color: var(--color-success);
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmarkDraw 500ms ease 200ms forwards;
}

/* Reduced-motion handling for these animations lives in ONE place —
   responsive.css — not here, to eliminate the duplicate @media query
   this file previously had alongside style.css's own copy. */
