/* ═══════════════════════════════════════════════
   ATS SECURITY — ANIMATIONS & MOTION
   css/animations.css
   ═══════════════════════════════════════════════ */

/* ── Scroll-Driven Reveals ─────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(48px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-48px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(48px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes clipRevealX {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0% 0 0); }
}

/* CSS Scroll-Driven (modern browsers) */
.sd-reveal {
  animation: fadeUp linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}
.sd-reveal-left {
  animation: slideInLeft linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}
.sd-reveal-right {
  animation: slideInRight linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

/* ── Page Load / Hero Animations ──────────────── */
@keyframes heroLineReveal {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Loader ─────────────────────────────────────── */
@keyframes loaderDone {
  0%   { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

/* ── Cursor ─────────────────────────────────────── */
@keyframes cursorPulse {
  0%,100% { transform: translate(-50%,-50%) scale(1); }
  50%     { transform: translate(-50%,-50%) scale(1.15); }
}

/* ── Floating / Breathing Elements ─────────────── */
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-12px); }
}
@keyframes floatSlow {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-20px) rotate(2deg); }
}
@keyframes breathe {
  0%,100% { transform: scale(1); opacity: .6; }
  50%     { transform: scale(1.08); opacity: .9; }
}

/* ── Red Glow Pulse ─────────────────────────────── */
@keyframes redGlow {
  0%,100% { box-shadow: 0 0 0 0 rgba(192,57,43,0); }
  50%     { box-shadow: 0 0 32px 8px rgba(192,57,43,.2); }
}

/* ── Scroll Pulse (scroll indicator) ───────────── */
@keyframes scrollPulse {
  0%,100% { transform: scaleY(1); opacity: .28; }
  50%     { transform: scaleY(.48); opacity: 1; }
}

/* ── App Glow ───────────────────────────────────── */
@keyframes appGlow {
  0%,100% { opacity: .38; transform: translate(-50%,-50%) scale(1); }
  50%     { opacity: .68; transform: translate(-50%,-50%) scale(1.12); }
}

/* ── Marquee ────────────────────────────────────── */
@keyframes marquee {
  to { transform: translateX(-50%); }
}
@keyframes marqueeReverse {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}

/* ── Scroll Progress Bar ────────────────────────── */
@keyframes scrollProg {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Page Transitions ───────────────────────────── */
@keyframes curtainIn {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0% 0); }
}
@keyframes curtainOut {
  from { clip-path: inset(0 0 0% 0); }
  to   { clip-path: inset(100% 0 0% 0); }
}

/* ── Utility Classes ────────────────────────────── */

/* Float helpers */
.anim-float      { animation: float 6s ease-in-out infinite; }
.anim-float-slow { animation: floatSlow 9s ease-in-out infinite; }
.anim-breathe    { animation: breathe 4s ease-in-out infinite; }
.anim-red-glow   { animation: redGlow 3s ease-in-out infinite; }

/* Delay helpers */
.delay-100 { animation-delay: .1s !important; transition-delay: .1s !important; }
.delay-200 { animation-delay: .2s !important; transition-delay: .2s !important; }
.delay-300 { animation-delay: .3s !important; transition-delay: .3s !important; }
.delay-400 { animation-delay: .4s !important; transition-delay: .4s !important; }
.delay-500 { animation-delay: .5s !important; transition-delay: .5s !important; }
.delay-600 { animation-delay: .6s !important; transition-delay: .6s !important; }

/* ── Hover Transform Utilities ──────────────────── */
.hover-lift {
  transition: transform .4s var(--ease-expo);
}
.hover-lift:hover { transform: translateY(-4px); }

.hover-scale {
  transition: transform .4s var(--ease-expo);
}
.hover-scale:hover { transform: scale(1.03); }

/* ── Image Ken Burns ────────────────────────────── */
.ken-burns {
  animation: kenBurns 12s ease-in-out infinite alternate;
}
@keyframes kenBurns {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

/* ── Video zoom-in on load ──────────────────────── */
.hero-video {
  transform: scale(1.05);
  transition: transform 8s ease-out;
}
.hero-video.loaded { transform: scale(1); }

/* ── Stagger children helper ────────────────────── */
.stagger-children > *:nth-child(1) { transition-delay: 0ms; }
.stagger-children > *:nth-child(2) { transition-delay: 80ms; }
.stagger-children > *:nth-child(3) { transition-delay: 160ms; }
.stagger-children > *:nth-child(4) { transition-delay: 240ms; }
.stagger-children > *:nth-child(5) { transition-delay: 320ms; }
.stagger-children > *:nth-child(6) { transition-delay: 400ms; }

/* ── Reduced Motion Override ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .anim-float,
  .anim-float-slow,
  .anim-breathe,
  .anim-red-glow,
  .ken-burns,
  .hero-video,
  .sd-reveal,
  .sd-reveal-left,
  .sd-reveal-right {
    animation: none !important;
    transform: none !important;
    transition: none !important;
    opacity: 1 !important;
  }
}
