/* ── Scroll & Hover Animations ─────────────────────────
   Minimal, professional. Shared across standalone pages.
   ────────────────────────────────────────────────────── */

/* ── Scroll fade-in ─────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger children: add data-animate-stagger to parent */
[data-animate-stagger] > [data-animate] {
  transition-delay: calc(var(--stagger, 0) * 80ms);
}

/* ── Hover: cards ───────────────────────────────────── */
.animate-card {
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.animate-card:hover {
  border-color: var(--border-hi, #3a3a3a);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ── Hover: nav links (subtle underline grow) ───────── */
.animate-link {
  position: relative;
}

.animate-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.25s ease, left 0.25s ease;
}

.animate-link:hover::after {
  width: 100%;
  left: 0;
}

/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .animate-card {
    transition: none;
  }

  .animate-card:hover {
    transform: none;
    box-shadow: none;
  }

  .animate-link::after {
    transition: none;
  }
}
