/* ===========================================
   ANIMATIONS - Subtle, professional effects
   =========================================== */

/* Keyframe Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroIntroDrop {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }

  68% {
    opacity: 1;
    transform: translate3d(0, -2px, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroPortraitRise {
  from {
    opacity: 0;
    transform: translate3d(0, 26px, 0) scale(0.98);
  }

  72% {
    opacity: 1;
    transform: translate3d(0, -1px, 0) scale(1.01);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes heroStageIntroIn {
  from {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes heroStrokeReveal {
  from {
    opacity: 0;
    transform: scale(0.985);
  }

  to {
    opacity: 0.36;
    transform: scale(1);
  }
}

/* Scroll-triggered Animation Base */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays */
.stagger-1 {
  transition-delay: 0.1s;
}

.stagger-2 {
  transition-delay: 0.2s;
}

.stagger-3 {
  transition-delay: 0.3s;
}

.stagger-4 {
  transition-delay: 0.4s;
}

/* Card Hover Effects */
.card,
.case,
.sample-card,
.proof-card,
.process-step {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover,
.case:hover,
.sample-card:hover,
.proof-card:hover,
.process-step:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Hero Proof Card Hover */
.hero-proof-card {
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.hero-proof-card:hover {
  transform: scale(1.02);
  border-color: var(--accent);
}

/* Button Transitions */
.btn-primary,
.btn-light,
.btn-ghost,
.card-link,
.nav-cta {
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease,
    transform 0.2s ease;
}

.btn-primary:hover,
.btn-light:hover {
  transform: translateY(-2px);
}

/* Nav Link Transitions */
.nav-links a {
  transition: color 0.3s ease;
}

/* Pagination Hover */
.pagination-link {
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.pagination-link:hover {
  border-color: var(--accent);
  background: #fff;
  transform: translateY(-2px);
}

/* Footer Link Transitions */
.footer-links a {
  transition: color 0.3s ease;
}

/* Article Elements */
.article-body h2,
.article-body h3,
.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.content-figure,
.email-sample,
.metric-table,
.article-brief {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}



/* Mobile Optimizations */
@media (max-width: 900px) {
  .hero-intro,
  .hero-portrait-wrap {
    animation-delay: 0ms;
  }

  .hero-stage-intro {
    animation-delay: 760ms;
  }

  .hero-portrait-stroke {
    animation-delay: 0ms;
  }

  .animate-on-scroll {
    transition-duration: 0.4s;
    transform: translateY(20px);
  }

  .stagger-1,
  .stagger-2,
  .stagger-3,
  .stagger-4 {
    transition-delay: 0.05s;
  }

  .card:hover,
  .case:hover,
  .sample-card:hover,
  .proof-card:hover,
  .process-step:hover {
    transform: translateY(-2px);
  }
}


/* Editorial motion refinements */
.animate-on-scroll {
  transform: translateY(22px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

.animate-on-scroll.is-visible {
  transform: translateY(0);
}

.card:hover,
.case:hover,
.sample-card:hover,
.proof-card:hover,
.process-step:hover,
.hero-proof-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover,
.btn-light:hover,
.nav-cta:hover,
.pagination-link:hover {
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .animate-on-scroll {
    transform: translateY(16px);
    transition-duration: 0.45s;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .animate-on-scroll,
  .animate-on-scroll.is-visible,
  .hero-intro,
  .hero-stage-intro,
  .hero-portrait-wrap,
  .hero-portrait-stroke,
  .hero-portrait-wrap::after,
  .card:hover,
  .case:hover,
  .sample-card:hover,
  .proof-card:hover,
  .process-step:hover,
  .hero-proof-card:hover,
  .btn-primary:hover,
  .btn-light:hover,
  .nav-cta:hover,
  .pagination-link:hover {
    opacity: 1;
    transform: none !important;
  }
}
